diff options
author | Christopher Faylor <me@cgf.cx> | 2000-11-16 08:16:59 +0300 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2000-11-16 08:16:59 +0300 |
commit | 0d675c5d7f2493995ca7831c215b215d4b9bbe3a (patch) | |
tree | 5ee7cdaa6510aabfdefdbe5c17eeb40401507afd /winsup/cygwin/sigproc.cc | |
parent | cb6f4dbd0c842331a3020b5af31318797cd9a65a (diff) |
* sigproc.cc (wait_sig): Remove unneeded for loop iteration.
* exceptions.cc (interrupt_setup): Don't set signal mask here or races occur
with main thread. Set it in sigdelayed instead.
(sigreturn): Reflect change in stack order of ebp and flags.
(sigdelayed): Set stack frame correctly. Call set_process_mask here with flags
for last trapped signal.
(signal_dispatch): Add newmask.
* sigproc.cc (wait_sig): Eliminate ill-considered attempt to halt looping
signal processors.
Diffstat (limited to 'winsup/cygwin/sigproc.cc')
-rw-r--r-- | winsup/cygwin/sigproc.cc | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/winsup/cygwin/sigproc.cc b/winsup/cygwin/sigproc.cc index a30494043..ed778e7a5 100644 --- a/winsup/cygwin/sigproc.cc +++ b/winsup/cygwin/sigproc.cc @@ -70,8 +70,8 @@ HANDLE NO_COPY signal_arrived; // Event signaled when a signal has #define Static static NO_COPY -Static DWORD proc_loop_wait = 500; // Wait for subprocesses to exit -Static DWORD sig_loop_wait = 500; // Wait for signals to arrive +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 // signals are available for @@ -1109,7 +1109,7 @@ wait_sig (VOID *) HANDLE catchem[] = {sigcatch_main, sigcatch_nonmain, sigcatch_nosync}; sigproc_printf ("Ready. dwProcessid %d", myself->dwProcessId); - for (int i = 0; ; i++) + for (;;) { DWORD rc = WaitForMultipleObjects (3, catchem, FALSE, sig_loop_wait); @@ -1196,18 +1196,7 @@ wait_sig (VOID *) /* FIXME: The dispatched stuff probably isn't needed anymore. */ if (dispatched >= 0 && pending_signals < 0 && !saw_pending_signals) - { - pending_signals = 0; - /* FIXME FIXME FIXME FIXME FIXME - This is a real kludge designed to handle runaway processes who - missed a signal and never processed a signal handler. We have - to reset signal_arrived or stuff goes crazy. */ - if (i >= 20) - { - i = 0; - ResetEvent (signal_arrived); - } - } + pending_signals = 0; if (nzombies && saw_sigchld && !dispatched_sigchld) proc_subproc (PROC_CLEARWAIT, 0); |