From d2fa298ffa442c3ad285cdf7f85a1ce40d202d91 Mon Sep 17 00:00:00 2001 From: Davin McCall Date: Fri, 7 Jul 2017 18:13:40 +0100 Subject: [PATCH] service: fix recently introduced double-start bug. --- src/service.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/service.cc b/src/service.cc index d806085..47081d7 100644 --- a/src/service.cc +++ b/src/service.cc @@ -878,7 +878,10 @@ bool service_record::start_ps_process() noexcept bool base_process_service::start_ps_process() noexcept { if (restarting) { - return restart_ps_process(); + if (pid == -1) { + return restart_ps_process(); + } + return true; } else { eventLoop.get_time(restart_interval_time, clock_type::MONOTONIC); -- 2.25.1