-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
systemd: skip automatic restart when a JOB_STOP job is pending
Signed-off-by: Kyle Sessions <[email protected]>
- Loading branch information
Showing
2 changed files
with
31 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
systemd-patches/9504-core-skip-restart-when-a-JOB_STOP-job-is-pending.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
From 9b2f19a583b98e47ffa1f2bdf930eced4f537406 Mon Sep 17 00:00:00 2001 | ||
From: Kyle Sessions <[email protected]> | ||
Date: Sat, 4 May 2024 00:26:08 +0000 | ||
Subject: [PATCH] core: skip automatic restart when a JOB_STOP job is pending | ||
|
||
--- | ||
src/core/service.c | 7 +------ | ||
1 file changed, 1 insertion(+), 6 deletions(-) | ||
|
||
diff --git a/src/core/service.c b/src/core/service.c | ||
index 15e29be..fa2af05 100644 | ||
--- a/src/core/service.c | ||
+++ b/src/core/service.c | ||
@@ -1622,12 +1622,7 @@ static void service_enter_restart(Service *s) { | ||
|
||
if (UNIT(s)->job && UNIT(s)->job->type == JOB_STOP) { | ||
/* Don't restart things if we are going down anyway */ | ||
- log_unit_info(UNIT(s)->id, "Stop job pending for unit, delaying automatic restart."); | ||
- | ||
- r = service_arm_timer(s, s->restart_usec); | ||
- if (r < 0) | ||
- goto fail; | ||
- | ||
+ log_unit_info(UNIT(s)->id, "Stop job pending for unit, skipping automatic restart."); | ||
return; | ||
} | ||
|
||
-- | ||
2.40.1 | ||
|