summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/sigproc.cc
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2000-10-12 22:15:47 +0000
committerChristopher Faylor <me@cgf.cx>2000-10-12 22:15:47 +0000
commit1ec4f618feb517c020ff25784bedc66dd4f6f0e2 (patch)
treed146a1dab1ba5d6fcd6411bc85c783becac7f54a /winsup/cygwin/sigproc.cc
parent5e0d760fb82d2d04c34306803253777aa5040fce (diff)
downloadcygnal-1ec4f618feb517c020ff25784bedc66dd4f6f0e2.tar.gz
cygnal-1ec4f618feb517c020ff25784bedc66dd4f6f0e2.tar.bz2
cygnal-1ec4f618feb517c020ff25784bedc66dd4f6f0e2.zip
* child_info: Bump child_info "version".
(child_info): Move some fields from child_info_spawn to here. * cygheap.cc: Make cygheap pointers NOCOPY. * dcrt0.cc (dll_crt0_1): Copy cygwin heap here regardless of whether we've been forked or execed. * dtable.cc (dtable::fixup_after_fork): Just release close-on-exec fds. * exceptions.cc (stackdump): Respond to C warning. * fork.cc: Reorganize to minimize stack copying. (fork_child): New function. (fork_parent): Ditto. (sync_with_child): Don't suspend the forkee. (sync_with_parent): Ditto. Make into a function. * heap.cc (heap_init): Add some debugging output. * path.cc (path_conv::check): Add an assertion. (has_suffix): Ditto. * security.cc (get_pw_sid): Defend against NULL. * sigproc.cc (proc_subproc): Fix debugging output. (wait_sig): Ditto. * strace.cc: Make statics NO_COPY throughout. (strace::vsprntf): Defend against NULL.
Diffstat (limited to 'winsup/cygwin/sigproc.cc')
-rw-r--r--winsup/cygwin/sigproc.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/winsup/cygwin/sigproc.cc b/winsup/cygwin/sigproc.cc
index f4929f109..a2b01ccde 100644
--- a/winsup/cygwin/sigproc.cc
+++ b/winsup/cygwin/sigproc.cc
@@ -305,7 +305,6 @@ proc_subproc (DWORD what, DWORD val)
pchildren[nchildren] = vchild;
hchildren[nchildren] = vchild->hProcess;
ProtectHandle1 (vchild->hProcess, childhProc);
- nchildren++;
if (!DuplicateHandle (hMainProc, vchild->hProcess, hMainProc, &vchild->pid_handle,
0, 0, DUPLICATE_SAME_ACCESS))
system_printf ("Couldn't duplicate child handle for pid %d, %E", vchild->pid);
@@ -313,6 +312,7 @@ proc_subproc (DWORD what, DWORD val)
sigproc_printf ("added pid %d to wait list, slot %d, winpid %p, handle %p",
vchild->pid, nchildren, vchild->dwProcessId,
vchild->hProcess);
+ nchildren++;
wake_wait_subproc ();
break;
@@ -1163,7 +1163,7 @@ wait_sig (VOID *)
sigcatch_main = CreateSemaphore (&sec_none_nih, 0, MAXLONG, NULL);
sigcomplete_nonmain = CreateSemaphore (&sec_none_nih, 0, MAXLONG, NULL);
sigcomplete_main = CreateEvent (&sec_none_nih, FALSE, FALSE, NULL);
- sigproc_printf ("sigcatch_nonmain %p", sigcatch_nonmain);
+ sigproc_printf ("sigcatch_nonmain %p, sigcatch_main %p", sigcatch_nonmain, sigcatch_main);
/* Setting dwProcessId flags that this process is now capable of receiving
* signals. Prior to this, dwProcessId was set to the windows pid of