From 5dadd497ffd9835a2860cf89ad781d1b513803dc Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Sat, 5 Jun 2021 16:20:05 +0200 Subject: runsv: robustify signal handling - SIGTERM to child between vfork and exec could mess things up While at it, rename bb_signals_recursive_norestart() to bb_signals_norestart(): "recursive" was implying we are setting SA_NODEFER allowing signal handler to be entered recursively, but we do not do that. function old new delta bb_signals_norestart - 70 +70 startservice 380 394 +14 bb_signals_recursive_norestart 70 - -70 ------------------------------------------------------------------------------ (add/remove: 1/1 grow/shrink: 1/0 up/down: 84/-70) Total: 14 bytes Signed-off-by: Denys Vlasenko --- sysklogd/klogd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sysklogd') diff --git a/sysklogd/klogd.c b/sysklogd/klogd.c index 82596bc0b..df0edee0a 100644 --- a/sysklogd/klogd.c +++ b/sysklogd/klogd.c @@ -226,7 +226,7 @@ int klogd_main(int argc UNUSED_PARAM, char **argv) signal(SIGHUP, SIG_IGN); /* We want klogd_read to not be restarted, thus _norestart: */ - bb_signals_recursive_norestart(BB_FATAL_SIGS, record_signo); + bb_signals_norestart(BB_FATAL_SIGS, record_signo); syslog(LOG_NOTICE, "klogd started: %s", bb_banner); -- cgit v1.2.3