summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/sigproc.h
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2011-10-26 19:42:39 +0000
committerChristopher Faylor <me@cgf.cx>2011-10-26 19:42:39 +0000
commitb79b15e9e3160ef31b8ace8f167a8e9647670647 (patch)
treed688fb10d662cdb5248c4c1c6966db9218084186 /winsup/cygwin/sigproc.h
parentbe2280986de5339bca3d648ec0e7538541dcd674 (diff)
downloadcygnal-b79b15e9e3160ef31b8ace8f167a8e9647670647.tar.gz
cygnal-b79b15e9e3160ef31b8ace8f167a8e9647670647.tar.bz2
cygnal-b79b15e9e3160ef31b8ace8f167a8e9647670647.zip
* child_info.h (cchildren): New struct.
(child_info_spawn::nchildren): Rename from nprocs. (child_info_spawn::children): Change type to cchildren for more bookkeeping possibilities. (child_info_spawn::child_info_spawn): Clear nchildren. (child_info_spawn::record_children): Declare new function. (child_info_spawn::reattach_children): Ditto. * dcrt0.cc (child_info_spawn::handle_spawn): Call reattach_children to gather list of processes we are potentially waiting for. * pinfo.h (pinfo::pinfo): Make sure that rd_proc_pipe is always cleared. (pinfo::reattach): New function. * sigproc.cc: Move pinfo.h earlier so that it can be used in sigproc.h. (get_proc_lock): Don't bother with a lock during DLL initialization. (proc_subproc): Handle PROC_REATTACH_CHILD. (proc_terminate): Orphan children only when we are not an execed process or when the pid is about to be occupied by a non-cygwin process. (child_info_spawn::record_children): Define new function. (child_info_spawn::reattach_children): Ditto. * sigproc.h (procstuff): Define PROC_REATTACH_CHILD and renumber other elements. * spawn.cc (spawn_guts): Record any to-be-waited-for subprocesses if about to exec a cygwin process. * sigproc.cc (sig_send): Fix harmless transposition of fifth and six arguments to DuplicateHandle(). (child_info::child_info): Ditto. * globals.cc (hExeced): Make NO_COPY.
Diffstat (limited to 'winsup/cygwin/sigproc.h')
-rw-r--r--winsup/cygwin/sigproc.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/winsup/cygwin/sigproc.h b/winsup/cygwin/sigproc.h
index e0ea5e433..b63e5731a 100644
--- a/winsup/cygwin/sigproc.h
+++ b/winsup/cygwin/sigproc.h
@@ -34,10 +34,11 @@ enum
enum procstuff
{
PROC_ADDCHILD = 1, // add a new subprocess to list
- PROC_DETACHED_CHILD = 2, // set up a detached child
- PROC_CLEARWAIT = 3, // clear all waits - signal arrived
- PROC_WAIT = 4, // setup for wait() for subproc
- PROC_NOTHING = 5 // nothing, really
+ PROC_REATTACH_CHILD = 2, // reattach after exec
+ PROC_DETACHED_CHILD = 3, // set up a detached child
+ PROC_CLEARWAIT = 4, // clear all waits - signal arrived
+ PROC_WAIT = 5, // setup for wait() for subproc
+ PROC_NOTHING = 6 // nothing, really
};
struct sigpacket