aboutsummaryrefslogtreecommitdiff
path: root/gmid.c
diff options
context:
space:
mode:
Diffstat (limited to 'gmid.c')
-rw-r--r--gmid.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gmid.c b/gmid.c
index e125d90..928b1a6 100644
--- a/gmid.c
+++ b/gmid.c
@@ -513,9 +513,6 @@ main(int argc, char **argv)
return 0;
}
- signal(SIGPIPE, SIG_IGN);
- signal(SIGCHLD, SIG_IGN);
-
if (!conf.foreground && !configless) {
if (daemon(1, 1) == -1)
err(1, "daemon");
@@ -531,6 +528,9 @@ main(int argc, char **argv)
if (conf.ipv6)
sock6 = make_socket(conf.port, AF_INET6);
+ signal(SIGPIPE, SIG_IGN);
+ signal(SIGCHLD, SIG_IGN);
+
if (configless) {
setup_configless(argc, argv, cgi);
return 0;