From 00b93722aaca4a54967d2796a76a39c3c3bc1920 Mon Sep 17 00:00:00 2001 From: emaste Date: Sat, 14 Jun 2014 01:32:48 +0000 Subject: [PATCH] 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 git-svn-id: svn://svn.freebsd.org/base/stable/9@267463 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f --- usr.sbin/daemon/daemon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/daemon/daemon.c b/usr.sbin/daemon/daemon.c index 322c0d496..7bdd2a618 100644 --- a/usr.sbin/daemon/daemon.c +++ b/usr.sbin/daemon/daemon.c @@ -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. -- 2.45.0