diff options
author | dwmalone <dwmalone@FreeBSD.org> | 2001-05-10 15:48:33 +0000 |
---|---|---|
committer | dwmalone <dwmalone@FreeBSD.org> | 2001-05-10 15:48:33 +0000 |
commit | 5cdcaadd37c4b8d0893df55c62b3617e952f9287 (patch) | |
tree | b5e36c61243eeb912d7503045ea5fdb462120f9d /usr.sbin | |
parent | 7313c8ec6f5b6b72c50aaa925dede20fe6cd8815 (diff) | |
download | FreeBSD-src-5cdcaadd37c4b8d0893df55c62b3617e952f9287.zip FreeBSD-src-5cdcaadd37c4b8d0893df55c62b3617e952f9287.tar.gz |
Add the ability to specify alternate PID file for syslogd.
PR: 25784
Submitted by: Jon Villarreal <jonv@ivmg.net>
Reviewed by: iedowse
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/syslogd/syslogd.8 | 11 | ||||
-rw-r--r-- | usr.sbin/syslogd/syslogd.c | 9 |
2 files changed, 14 insertions, 6 deletions
diff --git a/usr.sbin/syslogd/syslogd.8 b/usr.sbin/syslogd/syslogd.8 index 2ba8821..e111e11 100644 --- a/usr.sbin/syslogd/syslogd.8 +++ b/usr.sbin/syslogd/syslogd.8 @@ -45,6 +45,7 @@ .Op Fl f Ar config_file .Op Fl m Ar mark_interval .Op Fl p Ar log_socket +.Op Fl P Ar pid_file .Op Fl l Ar path .Sh DESCRIPTION The @@ -172,6 +173,10 @@ Disable dns query for every request. Specify the pathname of an alternate log socket to be used instead; the default is .Pa /var/run/log . +.It Fl P +Specify an alternative file in which to store the process id. +The default is +.Pa /var/run/syslog.pid . .It Fl l Specify a location where .Nm @@ -220,7 +225,8 @@ and from the special device .Pp The .Nm -daemon creates the file +daemon creates its process id file, +by default .Pa /var/run/syslog.pid , and stores its process id there. @@ -241,8 +247,7 @@ include file .It Pa /etc/syslog.conf configuration file .It Pa /var/run/syslog.pid -process id of current -.Nm +default process id file .It Pa /var/run/log name of the .Tn UNIX diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c index ba71c95..a0198a3 100644 --- a/usr.sbin/syslogd/syslogd.c +++ b/usr.sbin/syslogd/syslogd.c @@ -325,7 +325,7 @@ main(argc, argv) pid_t ppid = 1; socklen_t len; - while ((ch = getopt(argc, argv, "46Aa:df:kl:m:np:suv")) != -1) + while ((ch = getopt(argc, argv, "46Aa:df:kl:m:np:P:suv")) != -1) switch (ch) { case '4': family = PF_INET; @@ -367,6 +367,9 @@ main(argc, argv) case 'p': /* path */ funixn[0] = optarg; break; + case 'P': /* path for alt. PID */ + PidFile = optarg; + break; case 's': /* no network mode */ SecureMode++; break; @@ -596,8 +599,8 @@ usage() fprintf(stderr, "%s\n%s\n%s\n", "usage: syslogd [-46Adnsuv] [-a allowed_peer] [-f config_file]", - " [-m mark_interval] [-p log_socket]", - " [-l log_socket]"); + " [-m mark_interval] [-l log_socket]", + " [-p log_socket] [-P pid_file]"); exit(1); } |