chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
main: check if we have a valid PID before getting the name of it
[elogind.git]
/
src
/
manager.c
diff --git
a/src/manager.c
b/src/manager.c
index df75eca8c48d6167bcc468b33d3662c7309d93d1..9edb8f09bbc990abc41e9904b71f6291e7ea0f75 100644
(file)
--- 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));