make kill() and pid() part of the public interface of ProcessImplementation
authorGerd von Egidy <gerd.von.egidy@intra2net.com>
Tue, 8 Sep 2015 17:08:28 +0000 (19:08 +0200)
committerGerd von Egidy <gerd.von.egidy@intra2net.com>
Tue, 8 Sep 2015 17:08:28 +0000 (19:08 +0200)
asyncio/async_process.hpp
unittest/test_simpleio_basics.cpp

index b0bdf0f..bc56b43 100644 (file)
@@ -123,10 +123,12 @@ class ProcessImplementation : public IOImplementation
       ///returns the exit code of the process (if in stopped state)
       int exitCode() const { return m_exit_code; }
 
+      bool kill(const Signal signal);
 
-   protected:
+      /// returns the pid of the child process
+      pid_t pid() { return m_pid; }
 
-      bool kill(const Signal signal);
+   protected:
 
       void setChildState(pid_t pid, int status);
 
index c964eb6..e86ad7a 100644 (file)
@@ -202,12 +202,6 @@ class TestProcess : public ProcessImplementation, public ReceivedData
             m_signal_read.connect( boost::bind(&TestProcess::slotReceivedData, this) );
         } // eo Testprocess(const std::string&, const std::vector<std::string>&)
 
-
-
-        pid_t pid() { return m_pid; }
-
-        bool kill( Signal signal) { return ProcessImplementation::kill(signal); }
-
     protected:
 
         void slotReceivedData()