diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2022-03-01 10:49:26 +0100 |
---|---|---|
committer | Luca Boccassi <bluca@debian.org> | 2022-03-10 15:51:28 +0100 |
commit | a257c941adffa3632081c34b5504182cbd5151d0 (patch) | |
tree | 744e484869d459214405390fb7663af17a8ec0d5 /src | |
parent | manager: prevent cleanup of triggering units before we start the handler (diff) | |
download | systemd-a257c941adffa3632081c34b5504182cbd5151d0.tar.xz systemd-a257c941adffa3632081c34b5504182cbd5151d0.zip |
manager: pass monitor metadata in more cases
The first ExecStartPre or the first ExecStart commands would get the metadata,
but not the subsequent ones. Also check that we do not pass it in
ExecStartPost.
Diffstat (limited to 'src')
-rw-r--r-- | src/core/service.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core/service.c b/src/core/service.c index 942bc7c0ff..acf3df77da 100644 --- a/src/core/service.c +++ b/src/core/service.c @@ -2459,6 +2459,7 @@ static void service_run_next_control(Service *s) { EXEC_APPLY_SANDBOXING|EXEC_APPLY_CHROOT|EXEC_IS_CONTROL| (IN_SET(s->control_command_id, SERVICE_EXEC_CONDITION, SERVICE_EXEC_START_PRE, SERVICE_EXEC_STOP_POST) ? EXEC_APPLY_TTY_STDIN : 0)| (IN_SET(s->control_command_id, SERVICE_EXEC_STOP, SERVICE_EXEC_STOP_POST) ? EXEC_SETENV_RESULT : 0)| + (IN_SET(s->control_command_id, SERVICE_EXEC_START_PRE, SERVICE_EXEC_START) ? EXEC_SETENV_MONITOR_RESULT : 0)| (IN_SET(s->control_command_id, SERVICE_EXEC_START_POST, SERVICE_EXEC_RELOAD, SERVICE_EXEC_STOP, SERVICE_EXEC_STOP_POST) ? EXEC_CONTROL_CGROUP : 0), &s->control_pid); if (r < 0) @@ -2495,7 +2496,7 @@ static void service_run_next_main(Service *s) { r = service_spawn(s, s->main_command, s->timeout_start_usec, - EXEC_PASS_FDS|EXEC_APPLY_SANDBOXING|EXEC_APPLY_CHROOT|EXEC_APPLY_TTY_STDIN|EXEC_SET_WATCHDOG, + EXEC_PASS_FDS|EXEC_APPLY_SANDBOXING|EXEC_APPLY_CHROOT|EXEC_APPLY_TTY_STDIN|EXEC_SET_WATCHDOG|EXEC_SETENV_MONITOR_RESULT, &pid); if (r < 0) goto fail; |