summaryrefslogtreecommitdiff
path: root/src/core/manager.c
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2014-02-09 20:08:55 -0500
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2014-02-11 19:14:47 -0500
commit4daf54a851e4fb7ed1a13c3117bba12528fd2c7f (patch)
treedd9db902bc6e5500bd2b5784714b4052265f0cf4 /src/core/manager.c
parentc480d2f8bc63565e40bd969054ebd97e9e2deca6 (diff)
journald: log provenience of signals
Diffstat (limited to 'src/core/manager.c')
-rw-r--r--src/core/manager.c21
1 files changed, 4 insertions, 17 deletions
diff --git a/src/core/manager.c b/src/core/manager.c
index f7e5cbdcf3..388697cdf5 100644
--- a/src/core/manager.c
+++ b/src/core/manager.c
@@ -1532,23 +1532,10 @@ static int manager_dispatch_signal_fd(sd_event_source *source, int fd, uint32_t
return -errno;
}
- if (sfsi.ssi_pid > 0) {
- _cleanup_free_ char *p = NULL;
-
- get_process_comm(sfsi.ssi_pid, &p);
-
- log_full(sfsi.ssi_signo == SIGCHLD ||
- (sfsi.ssi_signo == SIGTERM && m->running_as == SYSTEMD_USER)
- ? LOG_DEBUG : LOG_INFO,
- "Received SIG%s from PID "PID_FMT" (%s).",
- signal_to_string(sfsi.ssi_signo),
- sfsi.ssi_pid, strna(p));
- } else
- log_full(sfsi.ssi_signo == SIGCHLD ||
- (sfsi.ssi_signo == SIGTERM && m->running_as == SYSTEMD_USER)
- ? LOG_DEBUG : LOG_INFO,
- "Received SIG%s.",
- signal_to_string(sfsi.ssi_signo));
+ log_received_signal(sfsi.ssi_signo == SIGCHLD ||
+ (sfsi.ssi_signo == SIGTERM && m->running_as == SYSTEMD_USER)
+ ? LOG_DEBUG : LOG_INFO,
+ &sfsi);
switch (sfsi.ssi_signo) {