* ntdll.h (IsEventSignalled): New inline function.
* cygthread.cc (cygthread::terminate_thread): Use IsEventSignalled in place of WaitForSingleObject on event with 0 timeout. * fhandler.cc (fhandler_base_overlapped::has_ongoing_io): Ditto. * fhandler_fifo.cc (fhandler_fifo::open_nonserver): Ditto. (fhandler_fifo::wait): Ditto. * fhandler_termios.cc (fhandler_termios::bg_check): Ditto. * select.cc (verify_tty_slave): Ditto. * thread.cc (pthread::testcancel): Ditto.
This commit is contained in:
@ -19,6 +19,7 @@ details. */
|
||||
#include "pinfo.h"
|
||||
#include "tty.h"
|
||||
#include "cygtls.h"
|
||||
#include "ntdll.h"
|
||||
|
||||
/* Common functions shared by tty/console */
|
||||
|
||||
@ -175,7 +176,7 @@ fhandler_termios::bg_check (int sig)
|
||||
|
||||
/* Don't raise a SIGTT* signal if we have already been interrupted
|
||||
by another signal. */
|
||||
if (WaitForSingleObject (signal_arrived, 0) != WAIT_OBJECT_0)
|
||||
if (!IsEventSignalled (signal_arrived))
|
||||
{
|
||||
siginfo_t si = {0};
|
||||
si.si_signo = sig;
|
||||
|
Reference in New Issue
Block a user