Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2005-12-23 04:24:14 +0300
committerChristopher Faylor <me@cgf.cx>2005-12-23 04:24:14 +0300
commitede284de5fccecbde8a2b0b70471eec4cc5cd3eb (patch)
treee451d11c8070ad058dc929baf7852bc39ad4e6f8 /winsup/cygwin/fork.cc
parent52792a770dd5c40202ea98917b8af384b60da83c (diff)
* 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.cc9
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;