diff options
Diffstat (limited to 'lib/libc_r/uthread/uthread_wait4.c')
-rw-r--r-- | lib/libc_r/uthread/uthread_wait4.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/libc_r/uthread/uthread_wait4.c b/lib/libc_r/uthread/uthread_wait4.c index 5017fe5c1ac..a4f44e1d405 100644 --- a/lib/libc_r/uthread/uthread_wait4.c +++ b/lib/libc_r/uthread/uthread_wait4.c @@ -29,7 +29,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $OpenBSD: uthread_wait4.c,v 1.2 1999/01/06 05:29:29 d Exp $ + * $OpenBSD: uthread_wait4.c,v 1.3 1999/01/17 23:57:28 d Exp $ */ #include <errno.h> #include <sys/wait.h> @@ -42,6 +42,7 @@ wait4(pid_t pid, int *istat, int options, struct rusage * rusage) { pid_t ret; + _thread_enter_cancellation_point(); /* Perform a non-blocking wait4 syscall: */ while ((ret = _thread_sys_wait4(pid, istat, options | WNOHANG, rusage)) == 0 && (options & WNOHANG) == 0) { /* Reset the interrupted operation flag: */ @@ -57,6 +58,7 @@ wait4(pid_t pid, int *istat, int options, struct rusage * rusage) break; } } + _thread_leave_cancellation_point(); return (ret); } #endif |