Report failed/crashing tool command lines
Closes
#include <stdlib.h>
#include <string.h>
#include <fcntl.h>
+#include <limits.h>
#include <unistd.h>
#include <sys/stat.h>
@@ -245,10 +246,18 @@ ExecuteProcess(
{
result.m_ReturnCode = 1;
result.m_WasSignalled = true;
+
+ int sig = WTERMSIG(return_code);
+ TerminalIoPrintf(job_id, INT_MAX, "child process exited on signal %d: %s\n", sig, cmd_line);
}
else
{
result.m_ReturnCode = WEXITSTATUS(return_code);
+
+ if (0 != result.m_ReturnCode && !echo_cmdline)
+ {
+ TerminalIoPrintf(job_id, INT_MAX, "child process failed with exit code %d: %s\n", result.m_ReturnCode, cmd_line);
+ }
}
return result;
