aboutsummaryrefslogtreecommitdiff
path: root/src/utils.c
diff options
context:
space:
mode:
authorToni Uhlig <matzeton@googlemail.com>2018-05-30 15:43:08 +0200
committerToni Uhlig <matzeton@googlemail.com>2018-05-30 15:43:08 +0200
commit1c9022f075387e86269a79ac71f61dd4ac32c421 (patch)
tree535773b5db20511503bde730cf78339e18b894fd /src/utils.c
parent0dc05d5eaf474c30bcb71f77a2c34f521452c0b5 (diff)
POTD skeleton #83.
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
Diffstat (limited to 'src/utils.c')
-rw-r--r--src/utils.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/utils.c b/src/utils.c
index 96ea0cd..b070be2 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -173,6 +173,9 @@ pid_t daemonize(int stay_foreground)
assert( close_fds_except(0, 1, 2, -1) == 0 );
}
+ if (log_open())
+ return -1;
+
return pid;
}