From: Gerd von Egidy Date: Tue, 8 Sep 2015 17:08:28 +0000 (+0200) Subject: make kill() and pid() part of the public interface of ProcessImplementation X-Git-Tag: v0.3~4 X-Git-Url: http://developer.intra2net.com/git/?p=libasyncio;a=commitdiff_plain;h=811f4e70c4577e75ad68610c45d4114f4fcf9f3e make kill() and pid() part of the public interface of ProcessImplementation --- diff --git a/asyncio/async_process.hpp b/asyncio/async_process.hpp index b0bdf0f..bc56b43 100644 --- a/asyncio/async_process.hpp +++ b/asyncio/async_process.hpp @@ -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); diff --git a/unittest/test_simpleio_basics.cpp b/unittest/test_simpleio_basics.cpp index c964eb6..e86ad7a 100644 --- a/unittest/test_simpleio_basics.cpp +++ b/unittest/test_simpleio_basics.cpp @@ -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&) - - - pid_t pid() { return m_pid; } - - bool kill( Signal signal) { return ProcessImplementation::kill(signal); } - protected: void slotReceivedData()