X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fapp%2FProcess.hpp;h=6f5a5ae6f429806a3a9001885cecd26092c017f7;hb=0644360107ca50d681ae8b8cad608c7bc2ec7a40;hp=490cf07103a7c2338ca1e170168042bb2ad2e933;hpb=65dfaba8d22823ccbde6669c13fa598b6d23710e;p=blank.git diff --git a/src/app/Process.hpp b/src/app/Process.hpp index 490cf07..6f5a5ae 100644 --- a/src/app/Process.hpp +++ b/src/app/Process.hpp @@ -28,18 +28,28 @@ public: /// data is taken from given buffer, at most max_len bytes /// @return the number of bytes written std::size_t WriteIn(const void *buffer, std::size_t max_len); + /// close program's input stream + void CloseIn(); + /// read from the process' output stream /// data is stored in the given buffer, at most max_len bytes /// @return the number of bytes read std::size_t ReadOut(void *buffer, std::size_t max_len); + /// close program's output stream + void CloseOut(); + /// read from the process' error stream /// data is stored in the given buffer, at most max_len bytes /// @return the number of bytes read std::size_t ReadErr(void *buffer, std::size_t max_len); + /// close program's output stream + void CloseErr(); /// ask the process nicely to terminate /// (except on win32) void Terminate(); + /// check if the process has terminated + bool Terminated(); /// wait until the process exits and fetch its exit status int Join(); @@ -47,9 +57,6 @@ private: struct Impl; std::unique_ptr impl; - bool joined; - int status; - }; }