Apply wait_cancel patch
This commit is contained in:
parent
35dbe79943
commit
4a3584c84b
|
@ -1,3 +1,10 @@
|
||||||
|
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>
|
2003-01-14 Thomas Pfaff <tpfaff@gmx.net>
|
||||||
|
|
||||||
* signal.cc (sleep): Add pthread_testcancel call.
|
* signal.cc (sleep): Add pthread_testcancel call.
|
||||||
|
|
|
@ -481,10 +481,10 @@ sigwaitinfo ()
|
||||||
system ()
|
system ()
|
||||||
tcdrain ()
|
tcdrain ()
|
||||||
*usleep ()
|
*usleep ()
|
||||||
wait ()
|
*wait ()
|
||||||
wait3()
|
*wait3()
|
||||||
waitid ()
|
waitid ()
|
||||||
waitpid ()
|
*waitpid ()
|
||||||
write ()
|
write ()
|
||||||
writev ()
|
writev ()
|
||||||
|
|
||||||
|
|
|
@ -15,6 +15,7 @@ details. */
|
||||||
#include "cygerrno.h"
|
#include "cygerrno.h"
|
||||||
#include "sigproc.h"
|
#include "sigproc.h"
|
||||||
#include "perthread.h"
|
#include "perthread.h"
|
||||||
|
#include "thread.h"
|
||||||
|
|
||||||
/* This is called _wait and not wait because the real wait is defined
|
/* This is called _wait and not wait because the real wait is defined
|
||||||
in libc/syscalls/syswait.c. It calls us. */
|
in libc/syscalls/syswait.c. It calls us. */
|
||||||
|
@ -51,6 +52,8 @@ wait4 (int intpid, int *status, int options, struct rusage *r)
|
||||||
HANDLE waitfor;
|
HANDLE waitfor;
|
||||||
bool sawsig;
|
bool sawsig;
|
||||||
|
|
||||||
|
pthread_testcancel ();
|
||||||
|
|
||||||
while (1)
|
while (1)
|
||||||
{
|
{
|
||||||
sig_dispatch_pending (0);
|
sig_dispatch_pending (0);
|
||||||
|
@ -84,7 +87,7 @@ wait4 (int intpid, int *status, int options, struct rusage *r)
|
||||||
if ((waitfor = w->ev) == NULL)
|
if ((waitfor = w->ev) == NULL)
|
||||||
goto nochildren;
|
goto nochildren;
|
||||||
|
|
||||||
res = WaitForSingleObject (waitfor, INFINITE);
|
res = pthread::cancelable_wait (waitfor, INFINITE);
|
||||||
|
|
||||||
sigproc_printf ("%d = WaitForSingleObject (...)", res);
|
sigproc_printf ("%d = WaitForSingleObject (...)", res);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue