2012-01-13 Pedro Alves <palves@redhat.com>
* server.c (main): Avoid infinite loop while detaching/killing after a longjmp.
This commit is contained in:
parent
9241a8bcf3
commit
f128d5e9da
2 changed files with 15 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
|||
2012-01-13 Pedro Alves <palves@redhat.com>
|
||||
|
||||
* server.c (main): Avoid infinite loop while detaching/killing
|
||||
after a longjmp.
|
||||
|
||||
2012-01-09 Doug Evans <dje@google.com>
|
||||
|
||||
* server.c (start_inferior): Set last_ptid in --wrapper case.
|
||||
|
|
|
@ -2719,6 +2719,16 @@ main (int argc, char *argv[])
|
|||
|
||||
if (setjmp (toplevel))
|
||||
{
|
||||
/* If something fails and longjmps while detaching or killing
|
||||
inferiors, we'd end up here again, stuck in an infinite loop
|
||||
trap. Be sure that if that happens, we exit immediately
|
||||
instead. */
|
||||
if (setjmp (toplevel))
|
||||
{
|
||||
fprintf (stderr, "Detach or kill failed. Exiting\n");
|
||||
exit (1);
|
||||
}
|
||||
|
||||
detach_or_kill_for_exit ();
|
||||
exit (1);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue