From 3277e6552f69930188c8dab7859f0d68917d7544 Mon Sep 17 00:00:00 2001 From: Doug Freed Date: Tue, 25 Jun 2024 18:03:30 +0000 Subject: [PATCH] start-stop-daemon: open syslog The stop schedule code calls syslog, so we need to open a syslog connection so the process name will get properly logged on musl, and we can ensure the pid gets logged and the right facility is used. --- src/start-stop-daemon/start-stop-daemon.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/start-stop-daemon/start-stop-daemon.c b/src/start-stop-daemon/start-stop-daemon.c index 3e4a19a19..dda89a649 100644 --- a/src/start-stop-daemon/start-stop-daemon.c +++ b/src/start-stop-daemon/start-stop-daemon.c @@ -39,6 +39,7 @@ #include #include #include +#include #include #include #include @@ -359,6 +360,8 @@ int main(int argc, char **argv) signal_setup(SIGQUIT, handle_signal); signal_setup(SIGTERM, handle_signal); + openlog(applet, LOG_PID, LOG_DAEMON); + if ((tmp = getenv("SSD_NICELEVEL"))) if (sscanf(tmp, "%d", &nicelevel) != 1) eerror("%s: invalid nice level `%s' (SSD_NICELEVEL)",