summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin ROBIN <dev@benjarobin.fr>2024-10-06 17:02:06 +0200
committerMike Yuan <me@yhndnzj.com>2024-10-06 19:56:49 +0200
commit615279f369aa4116e21704386090570dc42f4a55 (patch)
tree5ffd1427b8e23fdc1300edf7e887e78c4a1b3f04
parentsd-json: reorder enum so that SD_JSON_FORMAT_OFF is first (diff)
downloadsystemd-615279f369aa4116e21704386090570dc42f4a55.tar.xz
systemd-615279f369aa4116e21704386090570dc42f4a55.zip
shutdown: In sync_with_progress(), log first then send SIGKILL
The order of these 2 lines was swapped in commit 758760a3610e3c6674de8a1d51b12b991eafef7c. Put them in the right order, and take yuwata's comment into account.
-rw-r--r--src/shutdown/shutdown.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/shutdown/shutdown.c b/src/shutdown/shutdown.c
index e6c9e0f806..57bb9a82d0 100644
--- a/src/shutdown/shutdown.c
+++ b/src/shutdown/shutdown.c
@@ -268,11 +268,10 @@ int sync_with_progress(int fd) {
}
/* Only reached in the event of a timeout. We should issue a kill to the stray process. */
+ r = log_error_errno(SYNTHETIC_ERRNO(ETIMEDOUT),
+ "Syncing %s - timed out, issuing SIGKILL to PID "PID_FMT".", what, pid);
(void) kill(pid, SIGKILL);
- return log_error_errno(SYNTHETIC_ERRNO(ETIMEDOUT),
- "Syncing %s - timed out, issuing SIGKILL to PID "PID_FMT".",
- what,
- pid);
+ return r;
}
static int read_current_sysctl_printk_log_level(void) {