#21 Also setsid on second fork, systemd seems to require it

pull/32/head
Geoffrey Merck 4 years ago
parent 12095eabb4
commit 88f51f75b3

@ -75,6 +75,10 @@ DAEMONIZE_RESULT CDaemon::daemonize(const std::string& pidFile)
return DR_PARENT;
}
if (setsid() < 0) {
return DR_FAILURE;
}
/* Set new file permissions */
umask(0);

Loading…
Cancel
Save

Powered by TurnKey Linux.