From 03d3cbfdb9886a5d0654cf4a8f53f064152bbc20 Mon Sep 17 00:00:00 2001 From: "Nicholas J. Kain" Date: Sun, 26 Dec 2010 18:21:58 -0500 Subject: [PATCH] Do not treat a failure to write the pid file after backgrounding after obtaining a lease as a fatal error. --- ndhc/sys.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) 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)