From 4a534f6a9f7f1d1ea1099d8e1b9a1830993874db Mon Sep 17 00:00:00 2001 From: fbt Date: Sun, 29 Nov 2026 18:17:23 +0000 Subject: [PATCH] move the recording of the exit outside of the cleanup, it does not actually run between respawns lmao Signed-off-by: fbt --- ssm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ssm b/ssm index 5a628bb..4b3dbab 100755 --- a/ssm +++ b/ssm @@ -265,10 +265,12 @@ svc() { anywait "$job_pid"; job_exit=127 else printf '%s' "$job_pid" > "$service_pidfile" - wait "$job_pid"; job_exit=$? fi + # Record the job exit code + printf '%d' "$job_exit" > "$service_exit_file" + # One service failure, two service failures... if service_success_exit u "$job_exit"; then job_success = 1 @@ -300,8 +302,6 @@ svc() { # Sleep a bit between restarts sleep "$service_respawn_delay" done - - #svc::cleanup }; readonly -f svc ## Run a command with its output discarded