From ddfd9e56116f7066008d1126a85f986bf6ce4986 Mon Sep 17 00:00:00 2001 From: Davin McCall Date: Thu, 8 Jun 2017 21:56:32 +0100 Subject: [PATCH] Enable SIGQUIT in child processes. --- src/dinit.cc | 1 + src/service.cc | 1 + 2 files changed, 2 insertions(+) diff --git a/src/dinit.cc b/src/dinit.cc index 282d4b1..831e2ae 100644 --- a/src/dinit.cc +++ b/src/dinit.cc @@ -237,6 +237,7 @@ static int dinit_main(int argc, char **argv) sigaddset(&sigwait_set, SIGCHLD); sigaddset(&sigwait_set, SIGINT); sigaddset(&sigwait_set, SIGTERM); + if (am_system_init) sigaddset(&sigwait_set, SIGQUIT); sigprocmask(SIG_BLOCK, &sigwait_set, NULL); // Terminal access control signals - we block these so that dinit can't be diff --git a/src/service.cc b/src/service.cc index 8595a33..1ce35c8 100644 --- a/src/service.cc +++ b/src/service.cc @@ -893,6 +893,7 @@ void ServiceRecord::run_child_proc(const char * const *args, const char *logfile sigdelset(&sigwait_set, SIGCHLD); sigdelset(&sigwait_set, SIGINT); sigdelset(&sigwait_set, SIGTERM); + sigdelset(&sigwait_set, SIGQUIT); constexpr int bufsz = ((CHAR_BIT * sizeof(pid_t)) / 3 + 2) + 11; // "LISTEN_PID=" - 11 characters; the expression above gives a conservative estimate -- 2.25.1