]> err.no Git - systemd/commitdiff
manager: don't show PID for incoming signals if it is 0
authorLennart Poettering <lennart@poettering.net>
Tue, 5 Apr 2011 23:33:34 +0000 (01:33 +0200)
committerLennart Poettering <lennart@poettering.net>
Tue, 5 Apr 2011 23:33:34 +0000 (01:33 +0200)
TODO
src/manager.c

diff --git a/TODO b/TODO
index f3c9b4057b866e27e26423b490c458bcb6da1bc9..f4aacacfb54e530f8d15073d5f71af2ddfeae9fd 100644 (file)
--- a/TODO
+++ b/TODO
@@ -21,13 +21,13 @@ F15:
 
 * fix alsa mixer restore to not print error when no config is stored
 
-* don't trim empty cgroups
-  https://bugzilla.redhat.com/show_bug.cgi?id=678555
-
 * disable most systemctl verbs in chroot()s
 
 Features:
 
+* don't trim empty cgroups
+  https://bugzilla.redhat.com/show_bug.cgi?id=678555
+
 * write blog stories about:
   - chroot, nspawn and friends
   - the blame game: systemd-analyze
index 9fc854b66104216ff5eea996960f007137208b60..6ddd40e8736c1817273b2129061582eb7814f61b 100644 (file)
@@ -2059,8 +2059,6 @@ 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)
@@ -2072,13 +2070,17 @@ static int manager_process_signal_fd(Manager *m) {
                         return -errno;
                 }
 
-                if (sfsi.ssi_pid > 0)
+                if (sfsi.ssi_pid > 0) {
+                        char *p = NULL;
+
                         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);
+                        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);
+                } else
+                        log_debug("Received SIG%s.", strna(signal_to_string(sfsi.ssi_signo)));
 
                 switch (sfsi.ssi_signo) {