X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fapp%2FProcess.hpp;h=490cf07103a7c2338ca1e170168042bb2ad2e933;hb=307482574d3acac09e38263de521a1826ceec7ce;hp=985b661aac967819adf89a9ebcb42fb4fc3fc0f7;hpb=8e75a34131e9fb04fb44a73f036da2aca872fa95;p=blank.git diff --git a/src/app/Process.hpp b/src/app/Process.hpp index 985b661..490cf07 100644 --- a/src/app/Process.hpp +++ b/src/app/Process.hpp @@ -10,13 +10,17 @@ namespace blank { class Process { +public: + using Arguments = std::vector; + using Environment = std::vector; + public: /// launch process executing the file at given path with /// given arguments and environment Process( const std::string &path, - const std::vector &args, - const std::vector &env); + const Arguments &args, + const Environment &env); ~Process(); public: @@ -33,6 +37,9 @@ public: /// @return the number of bytes read std::size_t ReadErr(void *buffer, std::size_t max_len); + /// ask the process nicely to terminate + /// (except on win32) + void Terminate(); /// wait until the process exits and fetch its exit status int Join();