From: Davin McCall Date: Sun, 26 May 2019 04:09:10 +0000 (+1000) Subject: Clear the stop timer if scripted start is interrupted. X-Git-Tag: v0.5.1~9 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=7a1f2650b293041885ff609f4f9238017c6fc4b6;p=oweals%2Fdinit.git Clear the stop timer if scripted start is interrupted. --- diff --git a/src/proc-service.cc b/src/proc-service.cc index 8db6877..d12a42c 100644 --- a/src/proc-service.cc +++ b/src/proc-service.cc @@ -368,11 +368,15 @@ void scripted_service::handle_exit_status(bp_sys::exit_status exit_status) noexc // We might be running the stop script, or we might be running the start script and have issued // a cancel order via SIGINT: if (interrupting_start) { + if (stop_timer_armed) { + restart_timer.stop_timer(event_loop); + stop_timer_armed = false; + } // We issued a start interrupt, so we expected this failure: if (did_exit && exit_status.get_exit_status() != 0) { log(loglevel_t::INFO, "Service ", get_name(), " start cancelled; exit code ", exit_status.get_exit_status()); - // Assume that a command terminating normally requires no cleanup: + // Assume that a command terminating normally (with failure status) requires no cleanup: stopped(); } else {