diff options
author | Christian Pointner <equinox@anytun.org> | 2010-01-12 21:53:59 +0000 |
---|---|---|
committer | Christian Pointner <equinox@anytun.org> | 2010-01-12 21:53:59 +0000 |
commit | b25f4dc131b9cd2b0575995d88f969627ce98ef6 (patch) | |
tree | 0c5f4c9c939c851cd2fc987f4ce0b4920ac25e50 /src/sysExec.h | |
parent | cleanup (diff) |
improved new SysExec cleanup
Diffstat (limited to 'src/sysExec.h')
-rw-r--r-- | src/sysExec.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/sysExec.h b/src/sysExec.h index d5315e4..7aada56 100644 --- a/src/sysExec.h +++ b/src/sysExec.h @@ -49,14 +49,21 @@ class SysExec SysExec(std::string const& script, StringVector const& args); SysExec(std::string const& script, StringList const& env); SysExec(std::string const& script, StringVector const& args, StringList const& env); - void waitForScript(); ~SysExec(); + + int waitForScript(); + int getReturnCode() const; + + static void waitAndDestroy(SysExec** s); + private: void doExec(std::string const& script, StringVector const& args, StringList const& env); + std::string script_; pid_t pid_; int pipefd_; bool closed_; + int return_code_; }; #endif |