mirror of https://github.com/mirror/busybox.git
syslogd: delay PID file creation until syslogd is ready
This patch moves the creation of the PID file until after syslogd has set up signal handlers and is ready. Signed-off-by: Joachim Nilsson <troglobit@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>pull/34/merge
parent
a4747230ab
commit
efe99b59c6
|
@ -1034,6 +1034,7 @@ static void do_syslogd(void)
|
|||
kmsg_init();
|
||||
|
||||
timestamp_and_log_internal("syslogd started: BusyBox v" BB_VER);
|
||||
write_pidfile_std_path_and_ext("syslogd");
|
||||
|
||||
while (!bb_got_signal) {
|
||||
ssize_t sz;
|
||||
|
@ -1182,9 +1183,6 @@ int syslogd_main(int argc UNUSED_PARAM, char **argv)
|
|||
bb_daemonize_or_rexec(DAEMON_CHDIR_ROOT, argv);
|
||||
}
|
||||
|
||||
//umask(0); - why??
|
||||
write_pidfile_std_path_and_ext("syslogd");
|
||||
|
||||
do_syslogd();
|
||||
/* return EXIT_SUCCESS; */
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue