diff options
author | Christopher Faylor <me@cgf.cx> | 2005-12-23 01:24:14 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2005-12-23 01:24:14 +0000 |
commit | ede284de5fccecbde8a2b0b70471eec4cc5cd3eb (patch) | |
tree | e451d11c8070ad058dc929baf7852bc39ad4e6f8 /winsup/cygwin/fork.cc | |
parent | 52792a770dd5c40202ea98917b8af384b60da83c (diff) | |
download | cygnal-ede284de5fccecbde8a2b0b70471eec4cc5cd3eb.tar.gz cygnal-ede284de5fccecbde8a2b0b70471eec4cc5cd3eb.tar.bz2 cygnal-ede284de5fccecbde8a2b0b70471eec4cc5cd3eb.zip |
* 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.
Diffstat (limited to 'winsup/cygwin/fork.cc')
-rw-r--r-- | winsup/cygwin/fork.cc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/winsup/cygwin/fork.cc b/winsup/cygwin/fork.cc index 98ef42769..31a5820df 100644 --- a/winsup/cygwin/fork.cc +++ b/winsup/cygwin/fork.cc @@ -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; |