aboutsummaryrefslogtreecommitdiff
path: root/src/wydawca.c
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2009-02-26 12:00:13 +0200
committerSergey Poznyakoff <gray@gnu.org.ua>2009-02-26 12:00:13 +0200
commit3c4b1e89c855d7ee2f9bae810ad75de946fa8edc (patch)
tree1a53233c4ec392fa65796a37ea3e4942796eb1f2 /src/wydawca.c
parent81640ab2b9ad954d4952aed43a70d7874da1c463 (diff)
downloadwydawca-3c4b1e89c855d7ee2f9bae810ad75de946fa8edc.tar.gz
wydawca-3c4b1e89c855d7ee2f9bae810ad75de946fa8edc.tar.bz2
Minor fixes
Diffstat (limited to 'src/wydawca.c')
-rw-r--r--src/wydawca.c14
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 ();
}

Return to:

Send suggestions and report system problems to the System administrator.