diff options
Diffstat (limited to 'src/daemon.c')
-rw-r--r-- | src/daemon.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/daemon.c b/src/daemon.c index bb2b8ded1..3cf81911e 100644 --- a/src/daemon.c +++ b/src/daemon.c @@ -134,10 +134,11 @@ daemonize_detach(void) fflush(NULL); pid = fork(); + if (pid < 0) + g_error("fork() failed: %s", g_strerror(errno)); + if (pid > 0) _exit(EXIT_SUCCESS); - else if (pid < 0) - g_error("problems fork'ing for daemon!"); if (chdir("/") < 0) g_error("problems changing to root directory"); |