joyent/libuv — pull request #979 by alexcrichton (2013-10-31 18:59:20+00:00)
Title: unix: return exec errors from uv_spawn, not async

If spawning a process fails due to an exec() failure (but it succeeded in
forking), then this should be considered a spawn failure instead of an
asynchronous termination of the process. This allows to check for common exec()
failure conditions such as a bad path quickly instead of having to rely on
keeping track of the async callback.

Additionally, the meaning of the two fields returned in the callback are now
exactly what they advertise to be. The process exit argument is not one of two
values depending on what happened to the child.

Closes #978