* exceptions.cc (sig_handle_tty_stop): Set stopsig to SIGCONT when continuing.

(stopped_or_terminated): Honor WCONTINUED.
* wait.cc (wait4): Ditto.
* include/cygwin/wait.h (WCONTINUED): Define.
(__W_CONTINUED): Ditto.
(WIFCONTINUED): Ditto.
This commit is contained in:
Christopher Faylor
2009-07-18 20:25:07 +00:00
parent d4e45e3b99
commit acced2cea2
5 changed files with 21 additions and 4 deletions

View File

@ -1050,7 +1050,7 @@ stopped_or_terminated (waitq *parent_w, _pinfo *child)
int terminated;
if (!((terminated = (child->process_state == PID_EXITED)) ||
((w->options & WUNTRACED) && child->stopsig)))
((w->options & (WUNTRACED | WCONTINUED)) && child->stopsig)))
return false;
parent_w->next = w->next; /* successful wait. remove from wait queue */
@ -1059,7 +1059,10 @@ stopped_or_terminated (waitq *parent_w, _pinfo *child)
if (!terminated)
{
sigproc_printf ("stopped child");
w->status = (child->stopsig << 8) | 0x7f;
if (child->stopsig == SIGCONT)
w->status = __W_CONTINUED;
else
w->status = (child->stopsig << 8) | 0x7f;
child->stopsig = 0;
}
else