Added automated exit handler in Util::Procs.

This commit is contained in:
Thulinma 2013-03-19 14:41:07 +01:00
parent f2b4e1d1a4
commit bf69dacefd
3 changed files with 69 additions and 35 deletions

View file

@ -18,8 +18,10 @@ namespace Util {
static std::map<pid_t, TerminationNotifier> exitHandlers; ///< termination function, if any
static bool handler_set; ///< If true, the sigchld handler has been setup.
static void childsig_handler(int signum);
static void exit_handler();
static void runCmd(std::string & cmd);
public:
static void setHandler();
public:
static pid_t Start(std::string name, std::string cmd);
static pid_t Start(std::string name, std::string cmd, std::string cmd2);
static pid_t Start(std::string name, std::string cmd, std::string cmd2, std::string cmd3);