commit - e3d81f49cc4084f6af16a497cf56d15d79d1c1b8
commit + b9c9123b8ecf2bd73498dc7cb0526be73df7ee9e
blob - 2d0022cbd86a691c4323c61bb1f64b5f2ae05ffc
blob + 47c406181f51956764c9e27ce8075e15312583fb
--- gmid.c
+++ gmid.c
struct tls_config *tlsconf;
struct tls *ctx;
+static void
+dummy_handler(int signo)
+{
+ return;
+}
+
/* XXX: create recursively */
void
mkdirs(const char *path)
return 0;
}
+
+ /* Linux seems to call the event handlers even when we're
+ * doing a sigwait. This dummy handlers is here to avoid
+ * being terminated on SIGHUP, SIGTERM or SIGINFO. */
+ signal(SIGHUP, dummy_handler);
+ signal(SIGINT, dummy_handler);
+ signal(SIGTERM, dummy_handler);
+
/* wait a sighup and reload the daemon */
for (;;) {
int p[2];
case -1:
fatal("fork: %s", strerror(errno));
case 0:
- signal(SIGHUP, SIG_IGN);
close(p[0]);
imsg_init(&exibuf, p[1]);
_exit(serve(argc, argv, &exibuf));