From b7ae70e1733a9713f4ab40b417fa23204fce5d91 Mon Sep 17 00:00:00 2001 From: Davin McCall Date: Tue, 1 Sep 2015 20:35:33 +0100 Subject: [PATCH] forceStop() needs to issue stop(). Both were issued when a process died unexpectedly, but in case of a dependent, forceStop() would be issued without stop() meaning that the dependent would not actually stop. --- service.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/service.cc b/service.cc index 93ffa1a..c77f7fd 100644 --- a/service.cc +++ b/service.cc @@ -92,7 +92,6 @@ void ServiceRecord::process_child_callback(struct ev_loop *loop, ev_child *w, in } else { sr->forceStop(); - sr->stop(); } if (sr->auto_restart && sr->service_set->get_auto_restart()) { @@ -385,6 +384,7 @@ bool ServiceRecord::start_ps_process(const std::vector &pargs) void ServiceRecord::forceStop() { force_stop = true; + stop(); for (sr_iter i = dependents.begin(); i != dependents.end(); i++) { (*i)->forceStop(); } -- 2.25.1