From 7da435aeb78a18a6d8c1cf664b17498aa118f4bb Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Mon, 29 Oct 2018 12:02:39 +0100 Subject: [PATCH] test: fix test runner execvp async-signal-safety execvp() is not async-signal-safe, execve() is. PR-URL: https://github.com/libuv/libuv/pull/2056 Reviewed-By: Gireesh Punathil Reviewed-By: Santiago Gimeno --- test/runner-unix.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/runner-unix.c b/test/runner-unix.c index bcc52055d..6506fb3ac 100644 --- a/test/runner-unix.c +++ b/test/runner-unix.c @@ -40,6 +40,7 @@ #include #include +extern char** environ; /* Do platform-specific initialization. */ int platform_init(int argc, char **argv) { @@ -107,8 +108,8 @@ int process_start(char* name, char* part, process_info_t* p, int is_helper) { /* child */ dup2(stdout_fd, STDOUT_FILENO); dup2(stdout_fd, STDERR_FILENO); - execvp(args[0], args); - perror("execvp()"); + execve(args[0], args, environ); + perror("execve()"); _exit(127); }