diff --git a/include/triton/tools/sys/exec.hpp b/include/triton/tools/sys/exec.hpp index 63e27609c..243f0f482 100644 --- a/include/triton/tools/sys/exec.hpp +++ b/include/triton/tools/sys/exec.hpp @@ -27,7 +27,8 @@ int exec(const std::string& cmd, std::string& result) { pclose(pipe); return 0; } - return WEXITSTATUS(pclose(pipe)); + int status = pclose(pipe); + return WEXITSTATUS(status); }