summaryrefslogtreecommitdiff
path: root/src/manager.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2011-03-16 02:55:55 +0100
committerLennart Poettering <lennart@poettering.net>2011-03-16 02:55:55 +0100
commitdfa7f7e139e465c7685fd530d61a52c41184bcde (patch)
tree6329c6a316fc18be850b80149708cd49444d3462 /src/manager.c
parentf9b72cd804f99222cf999c63eb3610a7f54bbf2c (diff)
main: check if we have a valid PID before getting the name of it
Diffstat (limited to 'src/manager.c')
-rw-r--r--src/manager.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/manager.c b/src/manager.c
index df75eca8c4..9edb8f09bb 100644
--- a/src/manager.c
+++ b/src/manager.c
@@ -2070,7 +2070,9 @@ static int manager_process_signal_fd(Manager *m) {
return -errno;
}
- get_process_name(sfsi.ssi_pid, &p);
+ if (sfsi.ssi_pid > 0)
+ 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));