Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Pfaff <tpfaff@gmx.net>2003-01-14 23:13:09 +0300
committerThomas Pfaff <tpfaff@gmx.net>2003-01-14 23:13:09 +0300
commit4a3584c84b70c3ac30645bd114c0891b1f54497b (patch)
treed759e1b512efdaef375d6fc2985124894fd577f3
parent35dbe799433e8a803f5605599284cdb80c8b20fc (diff)
Apply wait_cancel patch
-rw-r--r--winsup/cygwin/ChangeLog7
-rw-r--r--winsup/cygwin/thread.cc6
-rw-r--r--winsup/cygwin/wait.cc5
3 files changed, 14 insertions, 4 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 8ddb86120..c41395a01 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -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.
diff --git a/winsup/cygwin/thread.cc b/winsup/cygwin/thread.cc
index 2d154b4a2..649a3571b 100644
--- a/winsup/cygwin/thread.cc
+++ b/winsup/cygwin/thread.cc
@@ -481,10 +481,10 @@ sigwaitinfo ()
system ()
tcdrain ()
*usleep ()
-wait ()
-wait3()
+*wait ()
+*wait3()
waitid ()
-waitpid ()
+*waitpid ()
write ()
writev ()
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);