// commence normal stop. Note that if pid == -1 the process already stopped(!),
// that's handled below.
if (sr->pid != -1 && sr->stop_check_dependents()) {
- sr->all_deps_stopped();
+ sr->bring_down();
}
}
}
}
else if (service_state == service_state_t::STOPPING) {
if (stop_check_dependents()) {
- all_deps_stopped();
+ bring_down();
}
}
}
}
// All dependents have stopped; we can stop now, too. Only called when STOPPING.
-void service_record::all_deps_stopped() noexcept
+void service_record::bring_down() noexcept
{
waiting_for_deps = false;
stopped();
kill(-pgid, signo);
}
-void base_process_service::all_deps_stopped() noexcept
+void base_process_service::bring_down() noexcept
{
waiting_for_deps = false;
if (pid != -1) {
}
}
-void process_service::all_deps_stopped() noexcept
+void process_service::bring_down() noexcept
{
waiting_for_deps = false;
if (waiting_for_execstat) {
}
}
-void scripted_service::all_deps_stopped() noexcept
+void scripted_service::bring_down() noexcept
{
waiting_for_deps = false;
if (stop_command.length() == 0) {
void emergency_stop() noexcept;
// All dependents have stopped, and this service should proceed to stop.
- virtual void all_deps_stopped() noexcept;
+ virtual void bring_down() noexcept;
// Service has actually stopped (includes having all dependents
// reaching STOPPED state).
// Perform smooth recovery process
void do_smooth_recovery() noexcept;
- virtual void all_deps_stopped() noexcept override;
+ virtual void bring_down() noexcept override;
// Called when the process exits. The exit_status is the status value yielded by
// the "wait" system call.
{
virtual void handle_exit_status(int exit_status) noexcept override;
virtual void exec_failed(int errcode) noexcept override;
- virtual void all_deps_stopped() noexcept override;
+ virtual void bring_down() noexcept override;
public:
process_service(service_set *sset, string name, string &&command,
{
virtual void handle_exit_status(int exit_status) noexcept override;
virtual void exec_failed(int errcode) noexcept override;
- virtual void all_deps_stopped() noexcept override;
+ virtual void bring_down() noexcept override;
public:
scripted_service(service_set *sset, string name, string &&command,