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 commit640ace4a8d) (cherry picked from commitb56c47689c)
This commit is contained in:
committed by
Zbigniew Jędrzejewski-Szmek
parent
ed15dbd87d
commit
01bd69736c
@@ -1462,6 +1462,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