1
0
mirror of https://github.com/systemd/systemd.git synced 2025-03-19 22:50:17 +03:00

service: if we don't know the main pid of a service, we cannot accept any notification messages

This commit is contained in:
Lennart Poettering 2014-02-14 02:04:09 +01:00
parent 9f137db070
commit 336c6e4690

View File

@ -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;
}