From: Davin McCall Date: Fri, 7 Jul 2017 17:13:40 +0000 (+0100) Subject: service: fix recently introduced double-start bug. X-Git-Tag: v0.06~19 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=d2fa298ffa442c3ad285cdf7f85a1ce40d202d91;p=oweals%2Fdinit.git service: fix recently introduced double-start bug. --- 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);