From b93f0d9b2ae44ab75d469adf72783030a636b2ea Mon Sep 17 00:00:00 2001 From: turret Date: Sun, 14 Jan 2024 21:15:09 -0600 Subject: subsys: clear signal handlers since we moved our signal handlers to be created before subsystems are created, our new signal handlers (which namely blocks SIGTERM, used for panicing) are passed on. in order to restore full panic functionality, we clear all signal blocks before passing execution to the subsystem --- init/subsys.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/init/subsys.c b/init/subsys.c index 3db2cb5..c3fe903 100644 --- a/init/subsys.c +++ b/init/subsys.c @@ -41,6 +41,10 @@ static int __subsystem_entry(struct subsystem_info *info) prctl(PR_SET_NAME, name); free(name); + /* clear signal handlers so SIGTERM is no longer caught */ + static sigset_t set; + sigprocmask(SIG_SETMASK, &set, NULL); + print(LOG_DEBUG "subsys: starting subsystem %s (%d)", info->fn_name, getpid()); -- cgit v1.2.3