commit 6fea4e6f4f6f01daf890eea75ddbe1f855f1257a
parent e3551ab56ba76d198c19e2101c12b9408837950d
Author: Tim Kourt <tim.a.kourt@linux.intel.com>
Date: Tue, 22 Oct 2019 16:13:17 -0700
t-runner: Check for errors after opening file
Diffstat:
1 file changed, 3 insertions(+), 0 deletions(-)
diff --git a/tools/test-runner.c b/tools/test-runner.c
@@ -524,6 +524,9 @@ static pid_t execute_program(char *argv[], char *envp[], bool wait,
S_IRUSR | S_IWUSR);
}
+ if (fd == -1)
+ exit(EXIT_FAILURE);
+
dup2(fd, 1);
dup2(fd, 2);