diff options
Diffstat (limited to 'src/wydawca.c')
-rw-r--r-- | src/wydawca.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/wydawca.c b/src/wydawca.c index f02ac99..d210717 100644 --- a/src/wydawca.c +++ b/src/wydawca.c @@ -275,15 +275,19 @@ extern int reconfigure; void wydawca_daemon () { - check_pidfile (); - - if (!foreground && daemon (0, 0)) + if (!foreground) { - logmsg (LOG_ERR, "%s", strerror (errno)); - exit (EX_OSERR); + if (daemon (0, 0)) + { + logmsg (LOG_ERR, "%s", strerror (errno)); + exit (EX_OSERR); + } + logmsg (LOG_NOTICE, _("daemon launched")); } + check_pidfile (); wydawca_listener (); + remove_pidfile (); } |