1
0
Fork 0

check daemon() return value

This commit is contained in:
Aaron Marcher 2016-10-10 18:52:46 +02:00
parent 6890a27a3a
commit 3971c1f47c
No known key found for this signature in database
GPG key ID: 74B048E5C2474F9A

View file

@ -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));