From: Davin McCall Date: Thu, 8 Jun 2017 20:56:32 +0000 (+0100) Subject: Enable SIGQUIT in child processes. X-Git-Tag: v0.06~85 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=ddfd9e56116f7066008d1126a85f986bf6ce4986;p=oweals%2Fdinit.git Enable SIGQUIT in child processes. --- 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