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:
Ben Noordhuis 2013-10-18 17:29:19 +02:00
commit fe4f06261e
2 changed files with 17 additions and 7 deletions

View File

@ -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;
}

View File

@ -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;