service_record: declare handle_exit_status as pure virtual.
authorDavin McCall <davmac@davmac.org>
Tue, 30 May 2017 09:17:23 +0000 (10:17 +0100)
committerDavin McCall <davmac@davmac.org>
Tue, 30 May 2017 09:17:23 +0000 (10:17 +0100)
src/service.cc
src/service.h

index 466a523b746cd0e08ccb94a148fef1353c02a7c2..3d66e3a50102254381c425e84cc7c3c609d5f15e 100644 (file)
@@ -155,11 +155,6 @@ bool ServiceRecord::do_auto_restart() noexcept
     return false;
 }
 
-void base_process_service::handle_exit_status(int exit_status) noexcept
-{
-    // TODO make abstract
-}
-
 void process_service::handle_exit_status(int exit_status) noexcept
 {
     bool did_exit = WIFEXITED(exit_status);
index b4bc8150248cfc9e8a0dfa1b0860b39ac22ca4bf..ebe74b5126c1fd1b9257a887bd0be30080d6b224 100644 (file)
@@ -565,7 +565,7 @@ class base_process_service : public ServiceRecord
     bool start_ps_process(const std::vector<const char *> &args, bool on_console) noexcept;
 
     virtual void all_deps_stopped() noexcept;
-    virtual void handle_exit_status(int exit_status) noexcept;
+    virtual void handle_exit_status(int exit_status) noexcept = 0;
 
     // Read the pid-file, return false on failure
     bool read_pid_file() noexcept;