diff options
author | Dmitrij Tejblum <dt@FreeBSD.org> | 1999-06-29 19:57:07 +0000 |
---|---|---|
committer | Dmitrij Tejblum <dt@FreeBSD.org> | 1999-06-29 19:57:07 +0000 |
commit | db06cf96d52e1f0e9835c5479cd98ccd72e16fb3 (patch) | |
tree | ee37d0f9e9ac6d9a1112bd372e7354f9314e8b59 /lib/libc_r | |
parent | ba965cf7cc867f3ea88b3c6c0863a1953c68f05d (diff) | |
download | src-db06cf96d52e1f0e9835c5479cd98ccd72e16fb3.tar.gz src-db06cf96d52e1f0e9835c5479cd98ccd72e16fb3.zip |
Defer signals, so we will not wait for SIGCHLD after it was delivered.
Notes
Notes:
svn path=/head/; revision=48349
Diffstat (limited to 'lib/libc_r')
-rw-r--r-- | lib/libc_r/uthread/uthread_wait4.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/libc_r/uthread/uthread_wait4.c b/lib/libc_r/uthread/uthread_wait4.c index dda8aeea61cb..a3cd31b7e9fd 100644 --- a/lib/libc_r/uthread/uthread_wait4.c +++ b/lib/libc_r/uthread/uthread_wait4.c @@ -41,6 +41,8 @@ wait4(pid_t pid, int *istat, int options, struct rusage * rusage) { pid_t ret; + _thread_kern_sig_defer(); + /* 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: */ @@ -56,6 +58,9 @@ wait4(pid_t pid, int *istat, int options, struct rusage * rusage) break; } } + + _thread_kern_sig_undefer(); + return (ret); } #endif |