Merge remote-tracking branch 'origin/v0.10'
Conflicts: include/uv-darwin.h src/unix/fsevents.c src/unix/process.c
This commit is contained in:
commit
fe4f06261e
@ -188,8 +188,8 @@ skip:
|
||||
|
||||
|
||||
/*
|
||||
* Used for initializing stdio streams like options->stdin_stream. Returns
|
||||
* zero on success.
|
||||
* Used for initializing stdio streams like options.stdin_stream. Returns
|
||||
* zero on success. See also the cleanup section in uv_spawn().
|
||||
*/
|
||||
static int uv__process_init_stdio(uv_stdio_container_t* container, int fds[2]) {
|
||||
int mask;
|
||||
@ -472,11 +472,18 @@ int uv_spawn(uv_loop_t* loop,
|
||||
return 0;
|
||||
|
||||
error:
|
||||
for (i = 0; i < stdio_count; i++) {
|
||||
uv__close(pipes[i][0]);
|
||||
uv__close(pipes[i][1]);
|
||||
if (pipes != NULL) {
|
||||
for (i = 0; i < stdio_count; i++) {
|
||||
if (i < options->stdio_count)
|
||||
if (options->stdio[i].flags & (UV_INHERIT_FD | UV_INHERIT_STREAM))
|
||||
continue;
|
||||
if (pipes[i][0] != -1)
|
||||
close(pipes[i][0]);
|
||||
if (pipes[i][1] != -1)
|
||||
close(pipes[i][1]);
|
||||
}
|
||||
free(pipes);
|
||||
}
|
||||
free(pipes);
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
@ -141,7 +141,10 @@ static void uv__signal_handler(int signum) {
|
||||
saved_errno = errno;
|
||||
memset(&msg, 0, sizeof msg);
|
||||
|
||||
uv__signal_lock();
|
||||
if (uv__signal_lock()) {
|
||||
errno = saved_errno;
|
||||
return;
|
||||
}
|
||||
|
||||
for (handle = uv__signal_first_handle(signum);
|
||||
handle != NULL && handle->signum == signum;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user