diff options
author | Christopher Faylor <me@cgf.cx> | 2012-07-30 07:44:40 +0400 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2012-07-30 07:44:40 +0400 |
commit | d239805457f0dc790559b2173e943e5aebe90c4e (patch) | |
tree | a015664429e36ad8caa921deb24e5202d442bf34 /winsup/cygwin/sigproc.cc | |
parent | c1a11ccfca40ec5d162caf747bca94d9b698c34e (diff) |
* cygwait.cc (cancelable_wait): Add some debugging-only output.
* exceptions.cc (sig_handle_tty_stop): Make sure that incyg is cleared when
exiting if we have no parent process. Only wait for signal_arrived.
(sigpacket::process): Make continue_now a bool. Delay sending signal_arrived
until the end. Make code more defensive to avoid calling signal handler when
stopped. Only set signal_arrived when stopped.
* sigproc.cc (sig_hold): Rename from sigCONT. Make static.
(sig_send): Accommodate sigCONT -> sig_hold rename.
(wait_sig): Ditto.
* sigproc.h (sigCONT): Delete declaration.
* fhandler_console.cc (fhandler_console::write): Use new '%0c' facility to
print characters. Change to paranoid to avoid excessive strace output.
* fhandler_tty.cc (fhandler_pty_master::accept_input): Make frequent strace
printf "paranoid" to help cut down on strace output size.
* signal.cc (sigsuspend): Add standard syscall strace output.
(sigpause): Ditto.
(pause): Ditto.
* cygtls.h (_cygtls::reset_signal_arrived): New function.
Diffstat (limited to 'winsup/cygwin/sigproc.cc')
-rw-r--r-- | winsup/cygwin/sigproc.cc | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/winsup/cygwin/sigproc.cc b/winsup/cygwin/sigproc.cc index dcfbcbc55..d893fc2d8 100644 --- a/winsup/cygwin/sigproc.cc +++ b/winsup/cygwin/sigproc.cc @@ -46,8 +46,7 @@ char NO_COPY myself_nowait_dummy[1] = {'0'};// Flag to sig_send that signal goes #define Static static NO_COPY -HANDLE NO_COPY sigCONT; // Used to "STOP" a process - +Static HANDLE sig_hold; // Used to stop signal processing Static bool sigheld; // True if holding signals Static int nprocs; // Number of deceased children @@ -568,7 +567,7 @@ sig_send (_pinfo *p, int sig) return 0; else if (sig == __SIGNOHOLD || sig == __SIGEXIT) { - SetEvent (sigCONT); + SetEvent (sig_hold); sigheld = false; } else if (&_my_tls == _main_tls) @@ -1345,7 +1344,7 @@ static void WINAPI wait_sig (VOID *) { _sig_tls = &_my_tls; - sigCONT = CreateEvent (&sec_none_nih, FALSE, FALSE, NULL); + sig_hold = CreateEvent (&sec_none_nih, FALSE, FALSE, NULL); sigproc_printf ("entering ReadFile loop, my_readsig %p, my_sendsig %p", my_readsig, my_sendsig); @@ -1355,7 +1354,7 @@ wait_sig (VOID *) for (;;) { if (pack.si.si_signo == __SIGHOLD) - WaitForSingleObject (sigCONT, INFINITE); + WaitForSingleObject (sig_hold, INFINITE); DWORD nb; pack.tls = NULL; if (!ReadFile (my_readsig, &pack, sizeof (pack), &nb, NULL)) |