From 4a3584c84b70c3ac30645bd114c0891b1f54497b Mon Sep 17 00:00:00 2001 From: Thomas Pfaff Date: Tue, 14 Jan 2003 20:13:09 +0000 Subject: Apply wait_cancel patch --- winsup/cygwin/wait.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'winsup/cygwin/wait.cc') diff --git a/winsup/cygwin/wait.cc b/winsup/cygwin/wait.cc index a4e7c60a2..c66df1b31 100644 --- a/winsup/cygwin/wait.cc +++ b/winsup/cygwin/wait.cc @@ -15,6 +15,7 @@ details. */ #include "cygerrno.h" #include "sigproc.h" #include "perthread.h" +#include "thread.h" /* This is called _wait and not wait because the real wait is defined in libc/syscalls/syswait.c. It calls us. */ @@ -51,6 +52,8 @@ wait4 (int intpid, int *status, int options, struct rusage *r) HANDLE waitfor; bool sawsig; + pthread_testcancel (); + while (1) { sig_dispatch_pending (0); @@ -84,7 +87,7 @@ wait4 (int intpid, int *status, int options, struct rusage *r) if ((waitfor = w->ev) == NULL) goto nochildren; - res = WaitForSingleObject (waitfor, INFINITE); + res = pthread::cancelable_wait (waitfor, INFINITE); sigproc_printf ("%d = WaitForSingleObject (...)", res); -- cgit v1.2.3