summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/sigproc.cc
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2002-08-18 04:13:57 +0000
committerChristopher Faylor <me@cgf.cx>2002-08-18 04:13:57 +0000
commit0428827b0ef30a187a72fc0fc5352d7c0c170c82 (patch)
tree2656aed12a35fdd4ab8af643a82ad9a442934af0 /winsup/cygwin/sigproc.cc
parenta80add95d9e1598ff55e32801d1719a79146be8c (diff)
downloadcygnal-0428827b0ef30a187a72fc0fc5352d7c0c170c82.tar.gz
cygnal-0428827b0ef30a187a72fc0fc5352d7c0c170c82.tar.bz2
cygnal-0428827b0ef30a187a72fc0fc5352d7c0c170c82.zip
* sigproc.cc (sigCONT): Define.
* sigproc.h (sigCONT): Declare. (wait_sig): Create sigCONT event here. * exceptions.cc (sig_handle_tty_stop): Wait for sigCONT event rather than stopping thread. (sig_handle): Set sigCONT event as appropriate on SIGCONT rather than calling ResumeThread.
Diffstat (limited to 'winsup/cygwin/sigproc.cc')
-rw-r--r--winsup/cygwin/sigproc.cc20
1 files changed, 11 insertions, 9 deletions
diff --git a/winsup/cygwin/sigproc.cc b/winsup/cygwin/sigproc.cc
index 49c8bda57..b43057e1c 100644
--- a/winsup/cygwin/sigproc.cc
+++ b/winsup/cygwin/sigproc.cc
@@ -80,34 +80,35 @@ HANDLE NO_COPY signal_arrived; // Event signaled when a signal has
Static DWORD proc_loop_wait = 1000; // Wait for subprocesses to exit
Static DWORD sig_loop_wait = INFINITE; // Wait for signals to arrive
-Static HANDLE sigcatch_nonmain = NULL; // The semaphore signaled when
+Static HANDLE sigcatch_nonmain; // The semaphore signaled when
// signals are available for
// processing from non-main thread
-Static HANDLE sigcatch_main = NULL; // Signalled when main thread sends a
+Static HANDLE sigcatch_main; // Signalled when main thread sends a
// signal
-Static HANDLE sigcatch_nosync = NULL; // Signal wait_sig to scan sigtodo
+Static HANDLE sigcatch_nosync; // Signal wait_sig to scan sigtodo
// but not to bother with any
// synchronization
-Static HANDLE sigcomplete_main = NULL; // Event signaled when a signal has
+Static HANDLE sigcomplete_main; // Event signaled when a signal has
// finished processing for the main
// thread
-Static HANDLE sigcomplete_nonmain = NULL;// Semaphore raised for non-main
+Static HANDLE sigcomplete_nonmain; // Semaphore raised for non-main
// threads when a signal has finished
// processing
+HANDLE NO_COPY sigCONT; // Used to "STOP" a process
Static cygthread *hwait_sig; // Handle of wait_sig thread
Static cygthread *hwait_subproc; // Handle of sig_subproc thread
-Static HANDLE wait_sig_inited = NULL; // Control synchronization of
+Static HANDLE wait_sig_inited; // Control synchronization of
// message queue startup
/* Used by WaitForMultipleObjects. These are handles to child processes.
*/
-Static HANDLE events[PSIZE + 1] = {0}; // All my children's handles++
+Static HANDLE events[PSIZE + 1]; // All my children's handles++
#define hchildren (events + 1) // Where the children handles begin
Static char cpchildren[PSIZE * sizeof (pinfo)]; // All my children info
-Static int nchildren = 0; // Number of active children
+Static int nchildren; // Number of active children
Static char czombies[NZOMBIES * sizeof (pinfo)]; // All my deceased children info
-Static int nzombies = 0; // Number of deceased children
+Static int nzombies; // Number of deceased children
#define pchildren ((pinfo *) cpchildren)
#define zombies ((pinfo *) czombies)
@@ -1048,6 +1049,7 @@ wait_sig (VOID *self)
sigcomplete_nonmain = CreateSemaphore (&sec_none_nih, 0, MAXLONG, NULL);
sigcomplete_main = CreateEvent (&sec_none_nih, FALSE, FALSE, NULL);
sigproc_printf ("sigcatch_nonmain %p, sigcatch_main %p", sigcatch_nonmain, sigcatch_main);
+ sigCONT = CreateEvent (&sec_none_nih, FALSE, FALSE, NULL);
/* Setting dwProcessId flags that this process is now capable of receiving
* signals. Prior to this, dwProcessId was set to the windows pid of