From 3971c1f47c6b6b7b87a50efa24674c7820d24ac1 Mon Sep 17 00:00:00 2001 From: Aaron Marcher Date: Mon, 10 Oct 2016 18:52:46 +0200 Subject: check daemon() return value --- slstatus.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'slstatus.c') 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)); -- cgit v1.2.3