Merge pull request #133 from rhansen/pid-only-if-daemonized

Only write the PID file if daemonized
This commit is contained in:
Sandro 2020-05-29 10:51:56 +02:00 committed by GitHub
commit 104c3245ce
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -740,7 +740,7 @@ my @opt = (
[ "protocol", "=s", "-protocol type : update protocol used" ],
[ "file", "=s", "-file path : load configuration information from 'path'" ],
[ "cache", "=s", "-cache path : record address used in 'path'" ],
[ "pid", "=s", "-pid path : record process id in 'path'" ],
[ "pid", "=s", "-pid path : record process id in 'path' if daemonized" ],
"",
[ "use", "=s", "-use which : how the should IP address be obtained." ],
&ip_strategies_usage(),
@ -837,10 +837,6 @@ if (opt('foreground')) {
open(STDOUT, ">/dev/null");
open(STDERR, ">/dev/null");
open(STDIN, "</dev/null");
}
# write out the pid file if we're daemon'ized
if (opt('daemon')) {
write_pid();
}