forked from cory/tildefriends
libuv 1.46.0.
git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@4336 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
10
deps/libuv/test/runner-unix.c
vendored
10
deps/libuv/test/runner-unix.c
vendored
@@ -40,6 +40,10 @@
|
||||
#include <sys/time.h>
|
||||
#include <pthread.h>
|
||||
|
||||
#ifdef __APPLE__
|
||||
#include <TargetConditionals.h>
|
||||
#endif
|
||||
|
||||
extern char** environ;
|
||||
|
||||
static void closefd(int fd) {
|
||||
@@ -131,7 +135,11 @@ int process_start(char* name, char* part, process_info_t* p, int is_helper) {
|
||||
p->terminated = 0;
|
||||
p->status = 0;
|
||||
|
||||
#if defined(__APPLE__) && (TARGET_OS_TV || TARGET_OS_WATCH)
|
||||
pid = -1;
|
||||
#else
|
||||
pid = fork();
|
||||
#endif
|
||||
|
||||
if (pid < 0) {
|
||||
perror("fork");
|
||||
@@ -144,7 +152,9 @@ int process_start(char* name, char* part, process_info_t* p, int is_helper) {
|
||||
closefd(pipefd[0]);
|
||||
dup2(stdout_fd, STDOUT_FILENO);
|
||||
dup2(stdout_fd, STDERR_FILENO);
|
||||
#if !(defined(__APPLE__) && (TARGET_OS_TV || TARGET_OS_WATCH))
|
||||
execve(args[0], args, environ);
|
||||
#endif
|
||||
perror("execve()");
|
||||
_exit(127);
|
||||
}
|
||||
|
Reference in New Issue
Block a user