1 #include "ErrorHandler/MessageAnalyzer/ma_action_script.h"
7 using namespace novadaq::errorhandler;
13 int RunCommand(std::string
const & strCmd, std::string
const & strParam)
19 std::string command = strCmd +
" " + strParam;
21 iStatus = execl(
"/bin/sh",
"sh",
"-c", command.c_str(), (
char*) NULL);
29 waitpid(iForkId, &iStatus, 0);
40 ma_action_script::ma_action_script(
ma_rule const * rule, pset_t
const & pset )
43 script_name = pset.get<std::string>(
"name");
44 script_para = pset.get<std::string>(
"param", std::string());
46 param.init(rule, script_para);
49 bool ma_action_script::exec()
51 RunCommand(script_name, param.message());