]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
udevd: use signal_to_string() instead of strsignal() at one place
authorLennart Poettering <lennart@poettering.net>
Fri, 17 Feb 2017 10:18:22 +0000 (11:18 +0100)
committerLennart Poettering <lennart@poettering.net>
Fri, 17 Feb 2017 10:18:22 +0000 (11:18 +0100)
strsignal() sucks, as it tries to generate human readable strings from
something that isn't really human readable by concept. Let's use
signal_to_string() instead, making this more grokkable. Difference is:
SIGINT gets translated → "SIGINT" rather than → "Interrupted".

src/udev/udevd.c

index dd23054b0d7807aa96eb836a0f4fffe9da254a6c..ce2ff89b8548bafab4c561876651f5c8cb0309b8 100644 (file)
@@ -1210,7 +1210,7 @@ static int on_sigchld(sd_event_source *s, const struct signalfd_siginfo *si, voi
                         else
                                 log_warning("worker ["PID_FMT"] exited with return code %i", pid, WEXITSTATUS(status));
                 } else if (WIFSIGNALED(status)) {
-                        log_warning("worker ["PID_FMT"] terminated by signal %i (%s)", pid, WTERMSIG(status), strsignal(WTERMSIG(status)));
+                        log_warning("worker ["PID_FMT"] terminated by signal %i (%s)", pid, WTERMSIG(status), signal_to_string(WTERMSIG(status)));
                 } else if (WIFSTOPPED(status)) {
                         log_info("worker ["PID_FMT"] stopped", pid);
                         continue;