Skip to content
This repository has been archived by the owner on May 4, 2018. It is now read-only.

Commit

Permalink
unix: report exit_status==-1 when execve() fails
Browse files Browse the repository at this point in the history
Call exit_cb with exit_status==-1 when spawning a new process with uv_spawn()
fails.
  • Loading branch information
bnoordhuis committed Aug 14, 2012
1 parent 54bfb66 commit 7cd400e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/unix/process.c
Expand Up @@ -105,8 +105,10 @@ static void uv__chld(uv_signal_t* handle, int signum) {
if (WIFSIGNALED(status))
term_signal = WTERMSIG(status);

if (process->errorno)
if (process->errorno) {
uv__set_sys_error(process->loop, process->errorno);
exit_status = -1; /* execve() failed */
}

process->exit_cb(process, exit_status, term_signal);
}
Expand Down

0 comments on commit 7cd400e

Please sign in to comment.