summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Pointner <equinox@anytun.org>2009-02-12 02:21:25 +0000
committerChristian Pointner <equinox@anytun.org>2009-02-12 02:21:25 +0000
commit913bcd465861ff6ae5760e2335d9993057bff536 (patch)
tree4e2202167db156c8d2922c1982bdf1dd34807926 /src
parentimproved daemonizing (diff)
fixed loglevel at daemonize
Diffstat (limited to 'src')
-rw-r--r--src/daemon.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/daemon.h b/src/daemon.h
index f3ed638..071765e 100644
--- a/src/daemon.h
+++ b/src/daemon.h
@@ -129,7 +129,7 @@ void daemonize()
pid = fork();
if(pid < 0) {
- log_printf(WARNING, "daemonizing failed at fork(): %m, exitting");
+ log_printf(ERR, "daemonizing failed at fork(): %m, exitting");
exit(-1);
}
if(pid) exit(0);
@@ -137,19 +137,19 @@ void daemonize()
umask(0);
if(setsid() < 0) {
- log_printf(WARNING, "daemonizing failed at setsid(): %m, exitting");
+ log_printf(ERR, "daemonizing failed at setsid(): %m, exitting");
exit(-1);
}
pid = fork();
if(pid < 0) {
- log_printf(WARNING, "daemonizing failed at fork(): %m, exitting");
+ log_printf(ERR, "daemonizing failed at fork(): %m, exitting");
exit(-1);
}
if(pid) exit(0);
if ((chdir("/")) < 0) {
- log_printf(WARNING, "daemonizing failed at chdir(): %m, exitting");
+ log_printf(ERR, "daemonizing failed at chdir(): %m, exitting");
exit(-1);
}