diff --git a/man/sysklogd.8 b/man/sysklogd.8 index 2c8fdf0..4597511 100644 --- a/man/sysklogd.8 +++ b/man/sysklogd.8 @@ -23,6 +23,9 @@ sysklogd \- Linux system logging utilities. .I interval ] .RB [ " \-n " ] +.RB [ " \-P " +.I pid file +] .RB [ " \-p" .IB socket ] @@ -154,6 +157,11 @@ Avoid auto-backgrounding. This is needed especially if the is started and controlled by .BR init (8). .TP +.BI "\-P " "pid_file" +Specify an alternative file in which to store the process ID. +The default is +.IR /var/run/syslog.pid . +.TP .BI "\-p " "socket" You can specify an alternative unix domain socket instead of .IR /dev/log "." diff --git a/src/syslogd.c b/src/syslogd.c index 8b20132..17a9f25 100644 --- a/src/syslogd.c +++ b/src/syslogd.c @@ -342,7 +342,7 @@ int main(int argc, char *argv[]) funix[i] = -1; } - while ((ch = getopt(argc, argv, "46Aa:dhHf:l:m:np:R:rs:v?")) != EOF) { + while ((ch = getopt(argc, argv, "46Aa:dhHf:l:m:nP:p:R:rs:v?")) != EOF) { switch ((char)ch) { case '4': family = PF_INET; @@ -396,6 +396,10 @@ int main(int argc, char *argv[]) Foreground = 1; break; + case 'P': + PidFile = optarg; + break; + case 'p': /* path to regular log socket */ funixn[0] = optarg; break; @@ -681,13 +685,15 @@ int usage(int code) " -l HOST Host name to log without its FQDN, use ':' for multiple hosts\n" " -m INTV Interval between MARK messages in log, 0 to disable, default: 20\n" " -n Run in foreground, required when run from a modern init/supervisor\n" + " -P FILE Specify an alternative file in which to store the process ID.\n" + " The default is %s." " -p PATH Alternate path to UNIX domain socket, default: %s\n" " -r Act as remote syslog sink for other hosts\n" " -s NAME Strip domain name before logging, use ':' for multiple domains\n" " -v Show program version and exit\n" "\n" "Bug report address: %s\n", - _PATH_LOG, PACKAGE_BUGREPORT); + _PATH_LOGPID, _PATH_LOG, PACKAGE_BUGREPORT); exit(code); }