mirror of https://github.com/omar-polo/gmid.git
re-enable daemon mode
with the split into two process, the call to daemon was lost
This commit is contained in:
parent
b3927be446
commit
0170ba023f
5
gmid.c
5
gmid.c
|
@ -876,8 +876,11 @@ main(int argc, char **argv)
|
||||||
#endif
|
#endif
|
||||||
signal(SIGUSR2, sig_handler);
|
signal(SIGUSR2, sig_handler);
|
||||||
|
|
||||||
if (!conf.foreground)
|
if (!conf.foreground) {
|
||||||
signal(SIGHUP, SIG_IGN);
|
signal(SIGHUP, SIG_IGN);
|
||||||
|
if (daemon(1, 1) == -1)
|
||||||
|
err(1, "daemon");
|
||||||
|
}
|
||||||
|
|
||||||
if (socketpair(AF_UNIX, SOCK_STREAM, PF_UNSPEC, p) == -1)
|
if (socketpair(AF_UNIX, SOCK_STREAM, PF_UNSPEC, p) == -1)
|
||||||
fatal("socketpair: %s", strerror(errno));
|
fatal("socketpair: %s", strerror(errno));
|
||||||
|
|
Loading…
Reference in New Issue