From 3510e965c02f48d68ff11d441b196804d8a442ec Mon Sep 17 00:00:00 2001 From: Davin McCall Date: Sun, 31 Dec 2017 20:19:21 +0000 Subject: [PATCH] Renamed 'start_ps_process' function to 'bring_up'. Also some minor reorganising, improve comments etc. --- src/service.cc | 6 +++--- src/service.h | 53 ++++++++++++++++++++++++++++---------------------- 2 files changed, 33 insertions(+), 26 deletions(-) diff --git a/src/service.cc b/src/service.cc index a29948c..aaa9b9a 100644 --- a/src/service.cc +++ b/src/service.cc @@ -718,7 +718,7 @@ void service_record::all_deps_started(bool has_console) noexcept failed_to_start(); } - bool start_success = start_ps_process(); + bool start_success = bring_up(); if (! start_success) { failed_to_start(); } @@ -878,14 +878,14 @@ void service_record::failed_to_start(bool depfailed) noexcept } } -bool service_record::start_ps_process() noexcept +bool service_record::bring_up() noexcept { // default implementation: there is no process, so we are started. started(); return true; } -bool base_process_service::start_ps_process() noexcept +bool base_process_service::bring_up() noexcept { if (restarting) { if (pid == -1) { diff --git a/src/service.h b/src/service.h index 5fa51bc..7560239 100644 --- a/src/service.h +++ b/src/service.h @@ -258,6 +258,11 @@ class exec_status_pipe_watcher : public eventloop_t::fd_watcher_impl &args, bool on_console) noexcept; // Restart the process (due to start failure or unexpected termination). Restarts will be -- 2.25.1