]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/core/unit.c
manager: prevent cleanup of triggering units before we start the handler
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 2 Mar 2022 12:09:06 +0000 (13:09 +0100)
committerLuca Boccassi <bluca@debian.org>
Thu, 10 Mar 2022 14:51:28 +0000 (14:51 +0000)
commit02de9614d4a541032da3039c2cae918ec852be28
treeb599807b46b1fa9f67217ce65519dd0553aa59a8
parent7a5049c780454197c4f03632e67ea735ea803265
manager: prevent cleanup of triggering units before we start the handler

This fixes the following case:
OnFailure= would be spawned correctly, but OnSuccess= would be
spawned without the MONITOR_* metadata, because we'd "collect" the unit
that started successfully. So let's block cleanup while we have a job
running for the handler. The job cannot last infinitely, so at some point
we'll be able to collect both.
src/core/unit.c