From ceda7f069dfb375f694bcfa5ecc11b227a7a193d Mon Sep 17 00:00:00 2001 From: Jaakko Heinonen Date: Sun, 6 Apr 2014 16:35:49 +0000 Subject: [PATCH] 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: bin/187265 Submitted by: Kimo R MFC after: 2 weeks --- 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 322c0d496361..7bdd2a6183d9 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.