Summary: | [PATCH] Add an option to run `syslogd' in the foreground | ||||||
---|---|---|---|---|---|---|---|
Product: | Base System | Reporter: | Ravi Pokala <rpokala> | ||||
Component: | misc | Assignee: | freebsd-bugs (Nobody) <bugs> | ||||
Status: | Closed FIXED | ||||||
Severity: | Affects Only Me | Flags: | rpokala:
mfc-stable10?
rpokala: mfc-stable9? rpokala: mfc-stable8? |
||||
Priority: | --- | ||||||
Version: | CURRENT | ||||||
Hardware: | Any | ||||||
OS: | Any | ||||||
Attachments: |
|
Fixed in -HEAD by r279567. Please MFC to older releases after (1 week?) |
Created attachment 152635 [details] Add a '-F' option to make `syslogd' run in the foreground There is a narrow window while `syslogd' is restarting (such as when getting restarted by `newsyslog') wherein it might die, without cleaning up its PID file. (syslogd.c:waitdaemon() - if fork() fails, waitdaemon() calls errx(), and thus never returns. pidfile_remove() only gets called if waitdaemon() returns a negative value.) For this and other reasons, we've modified `syslogd' to run in the foreground, so a nanny process can immediately detect it exiting and restart it if needed. The attached patch adds a '-F' command-line argument to make `syslogd' run in foreground mode.