diff options
author | Christopher Faylor <me@cgf.cx> | 2004-12-23 14:57:08 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2004-12-23 14:57:08 +0000 |
commit | 4ee52924a61bdb2fd8ce7b64d111cf7df4d19fe3 (patch) | |
tree | 18464135531157edc28ecc4f73a7210511638611 /winsup/cygwin/fork.cc | |
parent | 3993374d4ee8a081056fad98ebed90975970ccee (diff) | |
download | newlib-4ee52924a61bdb2fd8ce7b64d111cf7df4d19fe3.zip newlib-4ee52924a61bdb2fd8ce7b64d111cf7df4d19fe3.tar.gz newlib-4ee52924a61bdb2fd8ce7b64d111cf7df4d19fe3.tar.bz2 |
* cygthread.cc (cygthread::stub): Detect if thread function wants to release
itself here, to avoid a race.
(cygthread::release): Clear more stuff. Add a diagnostic for an internal
error.
* cygthread.h (auto_release): New function.
* pinfo.h (pinfo::remember): Add an argument to denote whether child is
detached.
* fork.cc (fork_parent): Reflect change in arguments to pinfo::remember.
* pinfo.cc (_pinfo::exit): Signal exit more forcibly.
(proc_waiter): Use cygthread::auto_release to signify that cygthread::stub
should release the thread. This should avoid a race.
(pinfo::alert_parent): Don't signify an error when wr_proc_pipe == NULL.
* sigproc.cc (proc_subproc): Add support for PROC_DETACHED_CHILD.
* sigproc.h: Ditto.
* spawn.cc (spawn_guts): Specify whether child is detached or not when calling
pinfo::remember.
Diffstat (limited to 'winsup/cygwin/fork.cc')
-rw-r--r-- | winsup/cygwin/fork.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/winsup/cygwin/fork.cc b/winsup/cygwin/fork.cc index 770c6c2..b047814 100644 --- a/winsup/cygwin/fork.cc +++ b/winsup/cygwin/fork.cc @@ -413,7 +413,7 @@ fork_parent (HANDLE& hParent, dll *&first_dll, it in afterwards. This requires more bookkeeping than I like, though, so we'll just do it the easy way. So, terminate any child process if we can't actually record the pid in the internal table. */ - if (!child.remember ()) + if (!child.remember (false)) { TerminateProcess (pi.hProcess, 1); set_errno (EAGAIN); |