mirror of
https://github.com/clearlinux/systemd-stable.git
synced 2026-10-03 23:38:39 +00:00
socket: properly handle if our service vanished during runtime
(cherry picked from commit 640ace4a8d)
This commit is contained in:
committed by
Zbigniew Jędrzejewski-Szmek
parent
31dc5786e0
commit
b56c47689c
@@ -1502,6 +1502,12 @@ static void socket_enter_running(Socket *s, int cfd) {
|
||||
}
|
||||
|
||||
if (!pending) {
|
||||
if (!UNIT_ISSET(s->service)) {
|
||||
log_error_unit(UNIT(s)->id, "%s: service to activate vanished, refusing activation.", UNIT(s)->id);
|
||||
r = -ENOENT;
|
||||
goto fail;
|
||||
}
|
||||
|
||||
r = manager_add_job(UNIT(s)->manager, JOB_START, UNIT_DEREF(s->service), JOB_REPLACE, true, &error, NULL);
|
||||
if (r < 0)
|
||||
goto fail;
|
||||
|
||||
Reference in New Issue
Block a user