re-enable daemon mode

with the split into two process, the call to daemon was lost
This commit is contained in:
Omar Polo 2021-01-17 11:56:50 +00:00
parent b3927be446
commit 0170ba023f
1 changed files with 4 additions and 1 deletions

5
gmid.c
View File

@ -876,8 +876,11 @@ main(int argc, char **argv)
#endif
signal(SIGUSR2, sig_handler);
if (!conf.foreground)
if (!conf.foreground) {
signal(SIGHUP, SIG_IGN);
if (daemon(1, 1) == -1)
err(1, "daemon");
}
if (socketpair(AF_UNIX, SOCK_STREAM, PF_UNSPEC, p) == -1)
fatal("socketpair: %s", strerror(errno));