From owner-svn-src-all@FreeBSD.ORG Tue Jun 19 22:24:00 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3066D106566B; Tue, 19 Jun 2012 22:24:00 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1B5888FC0C; Tue, 19 Jun 2012 22:24:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q5JMNxDf000865; Tue, 19 Jun 2012 22:23:59 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5JMNxs3000863; Tue, 19 Jun 2012 22:23:59 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201206192223.q5JMNxs3000863@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Tue, 19 Jun 2012 22:23:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237277 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Jun 2012 22:24:00 -0000 Author: pjd Date: Tue Jun 19 22:23:59 2012 New Revision: 237277 URL: http://svn.freebsd.org/changeset/base/237277 Log: 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 Modified: head/sys/kern/sys_procdesc.c Modified: head/sys/kern/sys_procdesc.c ============================================================================== --- head/sys/kern/sys_procdesc.c Tue Jun 19 22:21:59 2012 (r237276) +++ head/sys/kern/sys_procdesc.c Tue Jun 19 22:23:59 2012 (r237277) @@ -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 t */ 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);