mirror of
https://github.com/octoleo/lsyncd.git
synced 2024-12-13 14:43:09 +00:00
write pid after daemonize()
This commit is contained in:
parent
e4d815b770
commit
50c133ff73
6
lsyncd.c
6
lsyncd.c
@ -1120,9 +1120,6 @@ l_configure(lua_State *L)
|
||||
* from this on log to configurated log end instead of
|
||||
* stdout/stderr */
|
||||
running = true;
|
||||
if (settings.pidfile) {
|
||||
write_pidfile(L, settings.pidfile);
|
||||
}
|
||||
if (!settings.nodaemon && !is_daemon) {
|
||||
if (!settings.log_file) {
|
||||
settings.log_syslog = true;
|
||||
@ -1130,6 +1127,9 @@ l_configure(lua_State *L)
|
||||
logstring("Debug", "daemonizing now.");
|
||||
daemonize(L);
|
||||
}
|
||||
if (settings.pidfile) {
|
||||
write_pidfile(L, settings.pidfile);
|
||||
}
|
||||
} else if (!strcmp(command, "nodaemon")) {
|
||||
settings.nodaemon = true;
|
||||
} else if (!strcmp(command, "logfile")) {
|
||||
|
Loading…
Reference in New Issue
Block a user