From a47b00f6652b3fa8c6db69b5346fc8f7cbed0122 Mon Sep 17 00:00:00 2001 From: fbt Date: Sun, 17 Nov 2019 17:48:51 +0300 Subject: [PATCH] We always know the mainpid, why the cloak & dagger Signed-off-by: fbt --- ssm | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/ssm b/ssm index 2431c50..1a9d15e 100755 --- a/ssm +++ b/ssm @@ -176,7 +176,6 @@ cgroup_get_procs() { }; readonly -f cgroup_get_procs ## Run the command and wait for it to die - svc() { declare job_pid job_exit job_success last_respawn fail_counter date counter p var job_pid job_exit job_success last_respawn fail_counter date counter p @@ -212,16 +211,6 @@ svc() { die "$job_exit" }; trap 'svc::cleanup' TERM - svc::reload() { - nullexec kill -n "$service_reload_signal" "$job_pid" - }; trap 'svc::reload' HUP - - # Signals to pass through to the mainpid. - svc::passthru() { kill -n "$1" "$2"; } - for s in "${service_signals_passthru[@]}"; do - trap "svc::passthru $s \$job_pid" "$s" - done - printf '%s' $BASHPID > "$svc_pidfile" # Cgroups @@ -471,8 +460,7 @@ start() { ## Usually just sends HUP reload() { service_running || return 3 - - kill -n 1 "$svc_pid" + nullexec kill -n "$service_reload_signal" "$service_pid" } ## Stop the service