diff options
author | Omar Polo <op@omarpolo.com> | 2021-01-17 11:56:50 +0000 |
---|---|---|
committer | Omar Polo <op@omarpolo.com> | 2021-01-17 11:56:50 +0000 |
commit | 0170ba023f9c85bde2c4ae410b0af741383b7317 (patch) | |
tree | 0d069e73e99a7e214f7707afa03a906efd1008bd /gmid.c | |
parent | b3927be446193f54dde95d62852ce6757c75189b (diff) |
re-enable daemon mode
with the split into two process, the call to daemon was lost
Diffstat (limited to 'gmid.c')
-rw-r--r-- | gmid.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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)); |