summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpjd <pjd@FreeBSD.org>2012-06-19 22:23:59 +0000
committerpjd <pjd@FreeBSD.org>2012-06-19 22:23:59 +0000
commit8f9f9f3c910e294732972d605e74fb808b9fb4a9 (patch)
treec1ef429103640d8d5b3a605cfccbf1c7928a4016
parent81ad62d5c5ada4f045f95f14c8e2346b0fbd8e6c (diff)
downloadFreeBSD-src-8f9f9f3c910e294732972d605e74fb808b9fb4a9.zip
FreeBSD-src-8f9f9f3c910e294732972d605e74fb808b9fb4a9.tar.gz
Check proper flag (PDF_DAEMON, not PD_DAEMON) when deciding if the process
should be killed or not. This fixes killing pdfork(2)ed process on last close of the corresponding process descriptor. Reviewed by: rwatson MFC after: 1 month
-rw-r--r--sys/kern/sys_procdesc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/sys_procdesc.c b/sys/kern/sys_procdesc.c
index 08d345f..0bf79b8 100644
--- a/sys/kern/sys_procdesc.c
+++ b/sys/kern/sys_procdesc.c
@@ -338,7 +338,7 @@ procdesc_reap(struct proc *p)
/*
* procdesc_close() - last close on a process descriptor. If the process is
- * still running, terminate with SIGKILL (unless PD_DAEMON is set) and let
+ * still running, terminate with SIGKILL (unless PDF_DAEMON is set) and let
* init(8) clean up the mess; if not, we have to clean up the zombie ourselves.
*/
static int
@@ -386,7 +386,7 @@ procdesc_close(struct file *fp, struct thread *td)
*/
p->p_sigparent = SIGCHLD;
proc_reparent(p, initproc);
- if ((pd->pd_flags & PD_DAEMON) == 0)
+ if ((pd->pd_flags & PDF_DAEMON) == 0)
kern_psignal(p, SIGKILL);
PROC_UNLOCK(p);
sx_xunlock(&proctree_lock);
OpenPOWER on IntegriCloud