* fork.cc (fork): Honor error return from sig_send. Don't continue with fork

if we couldn't suspend signals.
* sigproc.cc (sig_send): Set sigCONT event when we see __SIGNOHOLD.
(wait_sig): Remove holding_signals.  Create pipe with a buffer which will
theoretically cause blocking if there is nothing reading on the pipe.  Wait for
sigCONT at end of loop when we have a __SIGHOLD.
This commit is contained in:
Christopher Faylor
2005-12-23 01:24:14 +00:00
parent 52792a770d
commit ede284de5f
3 changed files with 24 additions and 8 deletions

View File

@@ -507,7 +507,14 @@ fork ()
return -1;
}
sig_send (NULL, __SIGHOLD);
if (sig_send (NULL, __SIGHOLD))
{
if (exit_state)
Sleep (INFINITE);
set_errno (EAGAIN);
return -1;
}
ischild = setjmp (grouped.ch.jmp);
void *esp;