From 0170ba023f9c85bde2c4ae410b0af741383b7317 Mon Sep 17 00:00:00 2001 From: Omar Polo Date: Sun, 17 Jan 2021 11:56:50 +0000 Subject: [PATCH] re-enable daemon mode with the split into two process, the call to daemon was lost --- gmid.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gmid.c b/gmid.c index ec6ec68..bb1254b 100644 --- a/gmid.c +++ b/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));