From 2f418d7ab9f44ee8d573a81a08c167dbf46f1658 Mon Sep 17 00:00:00 2001 From: Othmar Gsenger Date: Sun, 10 Jan 2010 22:10:05 +0000 Subject: fixed priviledge dropping on freebsd maybee todo: remove old non working preprocessor staments like NO_EXEC to make code simpler --- src/sysExec.h | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) (limited to 'src/sysExec.h') diff --git a/src/sysExec.h b/src/sysExec.h index e608472..f0461af 100644 --- a/src/sysExec.h +++ b/src/sysExec.h @@ -42,11 +42,21 @@ typedef std::vector StringVector; typedef std::list StringList; -void anytun_exec(std::string const& script); -void anytun_exec(std::string const& script, StringVector const& args); -void anytun_exec(std::string const& script, StringList const& env); -void anytun_exec(std::string const& script, StringVector const& args, StringList const& env); -void waitForScript(std::string const& script, pid_t pid, int pipefd); +class SysExec +{ + public: + SysExec(std::string const& script); + 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(); + private: + std::string script_; + pid_t pid_; + int pipefd_; + bool closed_; +}; #endif #endif -- cgit v1.2.3