From owner-svn-src-all@FreeBSD.ORG Sat Jun 14 01:32:48 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E9FF8679; Sat, 14 Jun 2014 01:32:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D6F3C2B6E; Sat, 14 Jun 2014 01:32:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5E1Wmnq048285; Sat, 14 Jun 2014 01:32:48 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5E1Wm1s048284; Sat, 14 Jun 2014 01:32:48 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201406140132.s5E1Wm1s048284@svn.freebsd.org> From: Ed Maste Date: Sat, 14 Jun 2014 01:32:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r267463 - stable/9/usr.sbin/daemon X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18 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: Sat, 14 Jun 2014 01:32:49 -0000 Author: emaste Date: Sat Jun 14 01:32:48 2014 New Revision: 267463 URL: http://svnweb.freebsd.org/changeset/base/267463 Log: MFC r264194: fix handling of -P without -p or -r Fork a child process and wait until the process terminates when the -P option is specified. This behavior is documented on the manual page. PR: 187265, 190643 Approved by: re Modified: stable/9/usr.sbin/daemon/daemon.c Directory Properties: stable/9/usr.sbin/daemon/ (props changed) Modified: stable/9/usr.sbin/daemon/daemon.c ============================================================================== --- stable/9/usr.sbin/daemon/daemon.c Sat Jun 14 01:24:22 2014 (r267462) +++ stable/9/usr.sbin/daemon/daemon.c Sat Jun 14 01:32:48 2014 (r267463) @@ -139,7 +139,7 @@ main(int argc, char *argv[]) * get SIGCHLD eventually. */ pid = -1; - if (pidfile != NULL || restart) { + if (pidfile != NULL || ppidfile != NULL || restart) { /* * Restore default action for SIGTERM in case the * parent process decided to ignore it.