summaryrefslogtreecommitdiff
path: root/slstatus.c
diff options
context:
space:
mode:
authorAaron Marcher <info@nulltime.net>2016-10-10 18:52:46 +0200
committerAaron Marcher <info@nulltime.net>2016-10-10 18:52:46 +0200
commit3971c1f47c6b6b7b87a50efa24674c7820d24ac1 (patch)
tree2a174172dd5e43bf1a599219f7e2f05a08118ffd /slstatus.c
parent6890a27a3a4b0ac5f57d1fe554db0dbb90909072 (diff)
check daemon() return value
Diffstat (limited to 'slstatus.c')
-rw-r--r--slstatus.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/slstatus.c b/slstatus.c
index 57ef9a9..0a0f743 100644
--- a/slstatus.c
+++ b/slstatus.c
@@ -621,8 +621,8 @@ main(int argc, char *argv[])
if (dflag && oflag) {
usage();
}
- if (dflag) {
- (void)daemon(1, 1);
+ if (dflag && daemon(1, 1) < 0) {
+ err(1, "daemon");
}
memset(&act, 0, sizeof(act));