diff options
author | oshogbo <oshogbo@FreeBSD.org> | 2015-08-12 20:08:54 +0000 |
---|---|---|
committer | oshogbo <oshogbo@FreeBSD.org> | 2015-08-12 20:08:54 +0000 |
commit | 7dae5ce3714095f9a7aeab4a6912750cffcdf5ec (patch) | |
tree | f79abbbb5c44654aeb696dcf3b6c36198bb69f09 /sys/kern | |
parent | f1aec4c41a5904ca4d455ee1cefbf3dafbc19b82 (diff) | |
download | FreeBSD-src-7dae5ce3714095f9a7aeab4a6912750cffcdf5ec.zip FreeBSD-src-7dae5ce3714095f9a7aeab4a6912750cffcdf5ec.tar.gz |
When the wait*(2) syscalls wait for any process (P_ALL), they should
ignore processes created with the pdfork(2) syscall.
PR: 201054
Approved by: pjd (mentor)
Discussed with: emaste, rwatson
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/kern_exit.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c index 3310d1d..d84c26f 100644 --- a/sys/kern/kern_exit.c +++ b/sys/kern/kern_exit.c @@ -981,6 +981,10 @@ proc_to_reap(struct thread *td, struct proc *p, idtype_t idtype, id_t id, switch (idtype) { case P_ALL: + if (p->p_procdesc != NULL) { + PROC_UNLOCK(p); + return (0); + } break; case P_PID: if (p->p_pid != (pid_t)id) { |