From: Lennart Poettering Date: Thu, 31 May 2018 13:50:46 +0000 (+0200) Subject: core: watch PIDs of scope units right after starting them X-Git-Tag: v239~145^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F9148%2Fhead;p=thirdparty%2Fsystemd.git 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. --- diff --git a/src/core/scope.c b/src/core/scope.c index 0d22c7525b3..5db32960441 100644 --- a/src/core/scope.c +++ b/src/core/scope.c @@ -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; }