diff options
author | Richard Phibel <rphibel@googlemail.com> | 2023-07-06 14:03:35 +0200 |
---|---|---|
committer | Richard Phibel <rphibel@googlemail.com> | 2023-07-06 14:35:33 +0200 |
commit | 2a39b91459a4c27985d9a58309c0fda25f3cd397 (patch) | |
tree | d27f249e95328b76e6a91210610eb7476f6d2bea /src/core/transaction.c | |
parent | service: add new RestartMode option (diff) | |
download | systemd-2a39b91459a4c27985d9a58309c0fda25f3cd397.tar.xz systemd-2a39b91459a4c27985d9a58309c0fda25f3cd397.zip |
service: fix for RestartMode=direct option
With the fix done in PR28215, the unit restart job is created with type JOB_START.
Because of that, it is not properly merged anymore with the old one: the
merged job has state JOB_RUNNING. It should have state JOB_WAITING.
I think that the old job is not cleaned up because we don't go through the failed state.
With this fix, the merged job is properly created with state JOB_WAITING.
Diffstat (limited to '')
-rw-r--r-- | src/core/transaction.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/transaction.c b/src/core/transaction.c index c85bc667ce..8b8e02f1c7 100644 --- a/src/core/transaction.c +++ b/src/core/transaction.c @@ -657,7 +657,7 @@ static int transaction_apply( /* Clean the job dependencies */ transaction_unlink_job(tr, j, false); - installed_job = job_install(j); + installed_job = job_install(j, mode); if (installed_job != j) { /* j has been merged into a previously installed job */ if (tr->anchor_job == j) |