mirror of
https://github.com/systemd/systemd.git
synced 2026-08-04 23:20:32 +00:00
core: watch PIDs of scope units right after starting them
Scope units don't have a main or control process we can watch, hence let's explicitly watch the PIDs contained in them early on, just to make things more robust and have at least something to watch.
This commit is contained in:
@@ -347,6 +347,9 @@ static int scope_start(Unit *u) {
|
||||
s->result = SCOPE_SUCCESS;
|
||||
|
||||
scope_set_state(s, SCOPE_RUNNING);
|
||||
|
||||
/* Start watching the PIDs currently in the scope */
|
||||
(void) unit_enqueue_rewatch_pids(UNIT(s));
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user