commit - 5a40216f37fc6b40a0861c685f9903f1a8bbb645
commit + 4a28dd014ac9a135b84902a0424aed8abbc68cb2
blob - e4ed9f743cc943c005815bac1cf68e1a0fed8192
blob + 1f96c7db0550c42447efd4f2524b4b7f4dbb0c83
--- gmid.c
+++ gmid.c
};
void
-siginfo_handler(int sig)
+sig_handler(int sig)
{
(void)sig;
}
struct tls *ctx = NULL;
struct tls_config *conf;
int sock, ch;
-
- signal(SIGPIPE, SIG_IGN);
- signal(SIGCHLD, SIG_IGN);
-
-#ifdef SIGINFO
- signal(SIGINFO, siginfo_handler);
-#endif
- signal(SIGUSR2, siginfo_handler);
-
connected_clients = 0;
if ((dir = absolutify_path("docs")) == NULL)
}
}
+ signal(SIGPIPE, SIG_IGN);
+ signal(SIGCHLD, SIG_IGN);
+
+#ifdef SIGINFO
+ signal(SIGINFO, sig_handler);
+#endif
+ signal(SIGUSR2, sig_handler);
+
+ if (!foreground)
+ signal(SIGHUP, SIG_IGN);
+
if ((conf = tls_config_new()) == NULL)
err(1, "tls_config_new");
blob - 99cd791e608eddf3c3c50fd9cb8ea822223d126d
blob + 963a5bb73a43c7135f532ac0c5be60c2946974cc
--- gmid.h
+++ gmid.h
};
/* gmid.c */
-void siginfo_handler(int);
+void sig_handler(int);
int starts_with(const char*, const char*);
ssize_t filesize(int);