* 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.
This commit is contained in:
@@ -39,7 +39,7 @@ cancelable_wait (HANDLE object, PLARGE_INTEGER timeout, unsigned mask)
|
||||
wait_objects[num++] = object;
|
||||
|
||||
set_signal_arrived thread_waiting (is_cw_sig_handle, wait_objects[num]);
|
||||
debug_printf ("thread waiting %d, signal_arrived %p", (int) thread_waiting, _my_tls.signal_arrived);
|
||||
debug_only_printf ("object %p, thread waiting %d, signal_arrived %p", object, (int) thread_waiting, _my_tls.signal_arrived);
|
||||
DWORD sig_n;
|
||||
if (!thread_waiting)
|
||||
sig_n = WAIT_TIMEOUT + 1;
|
||||
@@ -72,6 +72,7 @@ debug_printf ("thread waiting %d, signal_arrived %p", (int) thread_waiting, _my_
|
||||
while (1)
|
||||
{
|
||||
res = WaitForMultipleObjects (num, wait_objects, FALSE, INFINITE);
|
||||
debug_only_printf ("res %d", res);
|
||||
if (res == cancel_n)
|
||||
res = WAIT_CANCELED;
|
||||
else if (res == timeout_n)
|
||||
|
Reference in New Issue
Block a user