- Debug diagnostics now include exit status of hook script.
This commit is contained in:
Paul Beckingham 2014-05-14 21:43:03 -04:00
parent 3f2df5a3b6
commit 0b6e94280e

View file

@ -266,8 +266,7 @@ int Hooks::execute (
const std::string& input, const std::string& input,
std::string& output) std::string& output)
{ {
context.debug ("Hooks::execute " + command); int status = -1;
FILE* fp = popen (command.c_str (), "r+"); FILE* fp = popen (command.c_str (), "r+");
if (fp) if (fp)
{ {
@ -290,10 +289,11 @@ int Hooks::execute (
} }
fflush (fp); fflush (fp);
return pclose (fp); status = pclose (fp);
context.debug (format ("Hooks::execute {1} (status {2})", command, status));
} }
return -1; return status;
} }
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////