diff options
author | Omar Polo <op@omarpolo.com> | 2021-04-20 09:53:03 +0000 |
---|---|---|
committer | Omar Polo <op@omarpolo.com> | 2021-04-20 09:53:03 +0000 |
commit | 3841a3693094ae7cc3cfd4f80da7f463e2756bcc (patch) | |
tree | e428b2641af6c205c3467a9ded3165ec0378caa5 /gmid.c | |
parent | 74c0c7e4ce3d0e576ce14a8928a9972d15010c1f (diff) |
restore signal handlers before exec'ing CGI scripts
Diffstat (limited to 'gmid.c')
-rw-r--r-- | gmid.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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; |