summaryrefslogtreecommitdiff
path: root/src/core/service.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-02-14 02:04:09 +0100
committerLennart Poettering <lennart@poettering.net>2014-02-14 02:04:09 +0100
commit336c6e4690ea017a11799aa331ffedd4c59a31ad (patch)
treeab8a16ddb6e087091c4557411980524f8e43ce9b /src/core/service.c
parent9f137db070bceb064459ca24626d171737851045 (diff)
service: if we don't know the main pid of a service, we cannot accept any notification messages
Diffstat (limited to 'src/core/service.c')
-rw-r--r--src/core/service.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/core/service.c b/src/core/service.c
index 8c47e24bfb..5c6b638650 100644
--- a/src/core/service.c
+++ b/src/core/service.c
@@ -3349,10 +3349,12 @@ static void service_notify_message(Unit *u, pid_t pid, char **tags) {
return;
}
- if (s->notify_access == NOTIFY_MAIN && s->main_pid != 0 && pid != s->main_pid) {
- log_warning_unit(u->id,
- "%s: Got notification message from PID "PID_FMT", but reception only permitted for PID "PID_FMT,
- u->id, pid, s->main_pid);
+ if (s->notify_access == NOTIFY_MAIN && pid != s->main_pid) {
+
+ if (s->main_pid != 0)
+ log_warning_unit(u->id, "%s: Got notification message from PID "PID_FMT", but reception only permitted for main PID "PID_FMT, u->id, pid, s->main_pid);
+ else
+ log_warning_unit(u->id, "%s: Got notification message from PID "PID_FMT", but reception only permitted for main PID which is currently not known", u->id, pid);
return;
}