joyent/node — pull request #3897 by bnoordhuis (2012-08-21 11:38:24+00:00)
Title: child_process: emit error on exec failure

libuv calls the exit cb with exit code == -1 when it fails to spawn the new process. Anticipate that and emit the error on the ChildProcess object. Fixes simple/test-child-process-cwd.