Add the ability to specify alternate PID file for syslogd.

PR:		25784
Submitted by:	Jon Villarreal <jonv@ivmg.net>
Reviewed by:	iedowse
This commit is contained in:
David Malone 2001-05-10 15:48:33 +00:00
parent 44ced8b3c5
commit f0ee959841
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=76431
2 changed files with 14 additions and 6 deletions

View File

@ -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

View File

@ -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);
}