commit 0170ba023f9c85bde2c4ae410b0af741383b7317 from: Omar Polo date: Sun Jan 17 11:56:50 2021 UTC re-enable daemon mode with the split into two process, the call to daemon was lost commit - b3927be446193f54dde95d62852ce6757c75189b commit + 0170ba023f9c85bde2c4ae410b0af741383b7317 blob - ec6ec687ba23b9f71efc51e2045ec316079603c2 blob + bb1254b240dfceced27ad814dcf9570fda4af6c9 --- gmid.c +++ gmid.c @@ -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));