* lynx-nat.c (child_wait): Handle threads exiting.

This commit is contained in:
Jeff Law 1995-07-27 19:57:16 +00:00
parent ef920bd889
commit b339391255
1 changed files with 16 additions and 0 deletions

View File

@ -666,6 +666,22 @@ child_wait (pid, ourstatus)
error ("Signal for unknown thread was not SIGNEWTHREAD");
}
/* Check for thread termination. */
else if (WIFSTOPPED(status)
&& WSTOPSIG(status) == SIGTRAP
&& in_thread_list (pid))
{
int realsig;
realsig = ptrace (PTRACE_GETTRACESIG, pid, (PTRACE_ARG3_TYPE)0, 0);
if (realsig == SIGTHREADEXIT)
{
ptrace (PTRACE_CONT, PIDGET (pid), (PTRACE_ARG3_TYPE)0, 0);
continue;
}
}
#ifdef SPARC
/* SPARC Lynx uses an byte reversed wait status; we must use the
host macros to access it. These lines just a copy of