diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2013-12-27 22:12:38 -0500 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2014-01-02 19:45:47 -0500 |
commit | a9244623f785f504f799407b0228dea9655e24cb (patch) | |
tree | 11d20172b71268f44263a56c846b575a02ddbd50 /src/core | |
parent | 41aef6fc747a3b5b8bf47faa468881be16509c66 (diff) |
core/manager: print info about interesting signals
Information about signals which are not routinely received by systemd
are printed at info level. This should make it easier to see what is
happening in the system.
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/manager.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/src/core/manager.c b/src/core/manager.c index f69ae079df..ea8887a92e 100644 --- a/src/core/manager.c +++ b/src/core/manager.c @@ -1463,16 +1463,22 @@ static int manager_dispatch_signal_fd(sd_event_source *source, int fd, uint32_t } if (sfsi.ssi_pid > 0) { - char *p = NULL; + _cleanup_free_ char *p = NULL; get_process_comm(sfsi.ssi_pid, &p); - log_debug("Received SIG%s from PID %lu (%s).", - signal_to_string(sfsi.ssi_signo), - (unsigned long) sfsi.ssi_pid, strna(p)); - free(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 %lu (%s).", + signal_to_string(sfsi.ssi_signo), + (unsigned long) sfsi.ssi_pid, strna(p)); } else - log_debug("Received SIG%s.", signal_to_string(sfsi.ssi_signo)); + 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)); switch (sfsi.ssi_signo) { |