]> err.no Git - systemd/commitdiff
manager: show who killed us
authorLennart Poettering <lennart@poettering.net>
Mon, 14 Mar 2011 20:27:39 +0000 (21:27 +0100)
committerLennart Poettering <lennart@poettering.net>
Mon, 14 Mar 2011 20:30:54 +0000 (21:30 +0100)
src/manager.c

index cee434466591f2c28dc53dfffcd9e2b80ee0ec16..919560b054866734c15c1b41a330a3329300acad 100644 (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) {