summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2011-03-14 21:27:39 +0100
committerLennart Poettering <lennart@poettering.net>2011-03-14 21:30:54 +0100
commit72fe22f93059ec6bbc9c9da0171e3be9d8b1c9ce (patch)
tree44473717e444a5f3350ecc95f47cd815b311e759
parent1063dc3a525a87c0285e071794317f71724492fe (diff)
manager: show who killed us
-rw-r--r--src/manager.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/manager.c b/src/manager.c
index cee4344665..919560b054 100644
--- a/src/manager.c
+++ b/src/manager.c
@@ -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) {