* exceptions.cc (handle_sigsuspend): Force pending signal delivery before
waiting for signals to happen. * signal.cc (sleep): Force pending signal delivery before sleeping. (usleep): Ditto. (signal): Force pending signal delivery before manipulating signal stuff. (sigprocmask): Ditto. (kill_worker): Ditto. (abort): Ditto. (sigaction): Ditto. * syscalls.cc (readv): Force pending signal delivery before I/O. (writev): Ditto. (open): Ditto. * net.cc: Ditto, throughout. * sigproc.cc (sig_dispatch_pending): Deliver any pending signals prior to returning. * tty.cc (tty::make_pipes): Increase pipe buffer size.
This commit is contained in:
@ -516,6 +516,12 @@ sig_dispatch_pending (int justwake)
|
||||
{
|
||||
if (!hwait_sig)
|
||||
return 0;
|
||||
DWORD tid = GetCurrentThreadId ();
|
||||
|
||||
sigframe thisframe (mainthread);
|
||||
|
||||
if (tid == sigtid && !justwake)
|
||||
justwake = 1;
|
||||
|
||||
int was_pending = pending_signals;
|
||||
#ifdef DEBUGGING
|
||||
@ -544,6 +550,9 @@ sig_dispatch_pending (int justwake)
|
||||
system_printf ("%E releasing sigcatch_nosync(%p)", sigcatch_nosync);
|
||||
|
||||
}
|
||||
if (was_pending && !justwake)
|
||||
thisframe.call_signal_handler ();
|
||||
|
||||
return was_pending;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user