From: Davin McCall Date: Sat, 10 Feb 2018 16:53:09 +0000 (+0000) Subject: base_process_service: properly clean up in destructor. X-Git-Tag: v0.1.0~32 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=18acacfe2064ade28a4febbfeb85fd6e14020ac1;p=oweals%2Fdinit.git base_process_service: properly clean up in destructor. --- diff --git a/src/includes/proc-service.h b/src/includes/proc-service.h index 606c5b1..2a46f02 100644 --- a/src/includes/proc-service.h +++ b/src/includes/proc-service.h @@ -137,6 +137,10 @@ class base_process_service : public service_record ~base_process_service() noexcept { + if (reserved_child_watch) { + child_listener.unreserve(event_loop); + } + restart_timer.deregister(event_loop); } // Set the stop command and arguments (may throw std::bad_alloc)