X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fapp%2FProcess.hpp;fp=src%2Fapp%2FProcess.hpp;h=0e84ccdd1e1f1c5c4fb5ed1b81ca623e21498997;hb=7f829070c9a5e4e036b483863e5ee75a3a824c38;hp=732fd2f4ac413c49eef56234bc1daf1569d57843;hpb=985dff25f7fde96308a66e5b01bc226589fd0825;p=blank.git diff --git a/src/app/Process.hpp b/src/app/Process.hpp index 732fd2f..0e84ccd 100644 --- a/src/app/Process.hpp +++ b/src/app/Process.hpp @@ -38,15 +38,19 @@ public: /// read from the process' output stream /// data is stored in the given buffer, at most max_len bytes + /// timeout is the number of milliseconds to wait for the process + /// to produce output, -1 for indefinite /// @return the number of bytes read - std::size_t ReadOut(void *buffer, std::size_t max_len); + std::size_t ReadOut(void *buffer, std::size_t max_len, int timeout); /// 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 + /// timeout is the number of milliseconds to wait for the process + /// to produce output, -1 for indefinite /// @return the number of bytes read - std::size_t ReadErr(void *buffer, std::size_t max_len); + std::size_t ReadErr(void *buffer, std::size_t max_len, int timeout); /// close program's output stream void CloseErr();