2003-01-14 Thomas Pfaff <tpfaff@gmx.net>
+ * wait.cc: Include thread.h
+ (wait4): Add pthread_testcancel call.
+ Wait for child process and cancellation event.
+ * thread.cc: Update list of cancellation points.
+
+2003-01-14 Thomas Pfaff <tpfaff@gmx.net>
+
* signal.cc (sleep): Add pthread_testcancel call.
Wait for signal and cancellation event.
(usleep): Ditto.
#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. */
HANDLE waitfor;
bool sawsig;
+ pthread_testcancel ();
+
while (1)
{
sig_dispatch_pending (0);
if ((waitfor = w->ev) == NULL)
goto nochildren;
- res = WaitForSingleObject (waitfor, INFINITE);
+ res = pthread::cancelable_wait (waitfor, INFINITE);
sigproc_printf ("%d = WaitForSingleObject (...)", res);