Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 13 Mar 2001 16:32:49 -0800
From:      jonv@ivmg.net
To:        FreeBSD-gnats-submit@freebsd.org
Cc:        jonv@ivmg.net
Subject:   bin/25784: syslogd alternate PID file
Message-ID:  <E14czDd-0009rP-00@perineum.corp.telocity.net>

next in thread | raw e-mail | index | archive | help

>Number:         25784
>Category:       bin
>Synopsis:       Ability to specify alternate PID file for syslogd
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Tue Mar 13 16:30:01 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     Jon Villarreal
>Release:        FreeBSD 4.3-BETA i386
>Organization:
IVMG, Inc.
>Environment:
System: FreeBSD abydos.ivmg.net 4.3-BETA FreeBSD 4.3-BETA #0: Tue Mar 13 23:06:14 UTC 2001 jon@abydos.ivmg.net:/usr/src/sys/compile/ABYDOS i386


>Description:
	We have have a situation where we're running multiple copies
	of syslogd on the same host.  There is currently no way
	to specify an alternate PID file for syslogd, so the last
	copy of syslogd started clobbers the earlier one's PID file.

>How-To-Repeat:
>Fix:

*** syslogd.c.orig	Tue Mar 13 14:41:49 2001
--- syslogd.c	Tue Mar 13 15:45:43 2001
***************
*** 325,331 ****
  	pid_t ppid = 1;
  	socklen_t len;
  
! 	while ((ch = getopt(argc, argv, "46Aa:df:kl:m:np:suv")) != -1)
  		switch (ch) {
  		case '4':
  			family = PF_INET;
--- 325,331 ----
  	pid_t ppid = 1;
  	socklen_t len;
  
! 	while ((ch = getopt(argc, argv, "46Aa:df:kl:m:np:P:suv")) != -1)
  		switch (ch) {
  		case '4':
  			family = PF_INET;
***************
*** 367,372 ****
--- 367,375 ----
  		case 'p':		/* path */
  			funixn[0] = optarg;
  			break;
+ 		case 'P':		/* path for alt. PID */
+ 			PidFile = optarg;
+ 			break;
  		case 's':		/* no network mode */
  			SecureMode++;
  			break;
***************
*** 597,603 ****
  	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]");
  	exit(1);
  }
  
--- 600,606 ----
  	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] [-P pid_file");
  	exit(1);
  }
  
>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E14czDd-0009rP-00>