1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-06 08:26:52 +03:00

manager: show who killed us

This commit is contained in:
Lennart Poettering 2011-03-14 21:27:39 +01:00
parent 1063dc3a52
commit 72fe22f930

View File

@ -2057,6 +2057,8 @@ static int manager_process_signal_fd(Manager *m) {
assert(m);
for (;;) {
char *p = NULL;
if ((n = read(m->signal_watch.fd, &sfsi, sizeof(sfsi))) != sizeof(sfsi)) {
if (n >= 0)
@ -2068,7 +2070,11 @@ static int manager_process_signal_fd(Manager *m) {
return -errno;
}
log_debug("Received SIG%s", strna(signal_to_string(sfsi.ssi_signo)));
get_process_name(sfsi.ssi_pid, &p);
log_debug("Received SIG%s from PID %lu (%s)",
strna(signal_to_string(sfsi.ssi_signo)),
(unsigned long) sfsi.ssi_pid, strna(p));
free(p);
switch (sfsi.ssi_signo) {