]> git.tuebingen.mpg.de Git - paraslash.git/commit - daemon.c
Improve daemon_open_log_or_die().
authorAndre Noll <maan@tuebingen.mpg.de>
Sun, 31 Dec 2017 19:32:52 +0000 (20:32 +0100)
committerAndre Noll <maan@tuebingen.mpg.de>
Sun, 11 Feb 2018 10:28:17 +0000 (11:28 +0100)
commita047b764498632d977b75b543165383849a591f0
tree8034afa57985cc82143f0e9029d8127a0baa807f
parentec05ce7931f80398c0d628d93c7892d71094d320
Improve daemon_open_log_or_die().

If the log file can not be re-opened, the error message is lost
because the log file has already been closed when PARA_EMERG_LOG() is
called. We can do better by deferring the call to daemon_close_log()
until the new log file has been opened.

With the patch applied, the reason why the (new) log file could not
be opened is logged to the old file.
daemon.c