OSDN Git Service

Apply wait_cancel patch
authortpfaff <tpfaff>
Tue, 14 Jan 2003 20:13:06 +0000 (20:13 +0000)
committertpfaff <tpfaff>
Tue, 14 Jan 2003 20:13:06 +0000 (20:13 +0000)
winsup/cygwin/ChangeLog
winsup/cygwin/thread.cc
winsup/cygwin/wait.cc

index 8ddb861..c41395a 100644 (file)
@@ -1,5 +1,12 @@
 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.
index 2d154b4..649a357 100644 (file)
@@ -481,10 +481,10 @@ sigwaitinfo ()
 system ()
 tcdrain ()
 *usleep ()
-wait ()
-wait3()
+*wait ()
+*wait3()
 waitid ()
-waitpid ()
+*waitpid ()
 write ()
 writev ()
 
index a4e7c60..c66df1b 100644 (file)
@@ -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);