Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

unix: report exit_status==-1 when execve() fails

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 7cd400ef10bb727be9ff8e5e55affb435610a30f
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/unix/process.c
@@ -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);
}

0 comments on commit 7cd400e

Please sign in to comment.
You can’t perform that action at this time.