diff --git a/ndhc/sys.c b/ndhc/sys.c index 7db4a75..3f34130 100644 --- a/ndhc/sys.c +++ b/ndhc/sys.c @@ -20,10 +20,9 @@ void background(void) } called = 1; /* Do not fork again. */ if (file_exists(pidfile, "w") == -1) { - log_line("FATAL - cannot open pidfile for write!"); - exit(EXIT_FAILURE); - } - write_pid(pidfile); + log_line("cannot open pidfile for write!"); + } else + write_pid(pidfile); } void epoll_add(struct client_state_t *cs, int fd)