From: Mike Yuan Date: Fri, 5 Apr 2024 10:41:07 +0000 (+0800) Subject: core/service: add a FIXME to use pidfd to monitor foreign processes X-Git-Tag: v256-rc1~291^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=120be68b8d4d76f7cf8188a2c0e49b6a0b36dde7;p=thirdparty%2Fsystemd.git core/service: add a FIXME to use pidfd to monitor foreign processes --- diff --git a/src/core/service.c b/src/core/service.c index 7f4e1e4443a..61b2b9a9554 100644 --- a/src/core/service.c +++ b/src/core/service.c @@ -222,10 +222,10 @@ static int service_set_main_pidref(Service *s, PidRef pidref_consume) { r = pidref_is_my_child(&s->main_pid); if (r < 0) log_unit_warning_errno(UNIT(s), r, "Can't determine if process "PID_FMT" is our child, assuming it is not: %m", s->main_pid.pid); - else if (r == 0) + else if (r == 0) // FIXME: Supervise through pidfd here log_unit_warning(UNIT(s), "Supervising process "PID_FMT" which is not our child. We'll most likely not notice when it exits.", s->main_pid.pid); - s->main_pid_alien = r <= 0; + return 0; }