Bug 26662

Summary: syslogd crashing if kill'd with -9 or already running
Product: Base System Reporter: david <david>
Component: miscAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Unspecified   
Hardware: Any   
OS: Any   

Description david 2001-04-18 03:50:00 UTC
1.) If a syslogd process is already running when you try to start another,
    the second exits without a friendly message

(root@beast /etc/defaults) /usr/sbin/syslogd -s
(root@beast /etc/defaults) /usr/sbin/syslogd -s
syslogd: child pid 35283 exited with return code 1


2.) killall -9 syslogd.  The next time you start syslogd, it exits with a
    return code of 1.

(root@beast /etc) /usr/sbin/syslogd -s                  
(root@beast /etc) killall -9 syslogd
(root@beast /etc) /usr/sbin/syslogd -s
syslogd: child pid 35273 exited with return code 1
(root@beast /etc) /usr/sbin/syslogd -s
(root@beast /etc)

Fix: 

If syslogd is already running, print a friendly error message saying that it is.

As with the `kill -9` bug, I am not sure why it exits the next time you start it.
How-To-Repeat: see description
Comment 1 dd freebsd_committer freebsd_triage 2001-06-01 03:36:20 UTC
State Changed
From-To: open->closed

It exits because its socket, /var/run/log, is still there because you didn't 
give it a chance to clean up.  The solution is not to use SIGKILL.  In fact, 
don't use SIGKILL unless the program doesn't want to die after you send it 
a SIGTERM; you'll have less problems if you do it this way.