From: Alexis Campailla Date: Wed, 4 Dec 2013 19:04:47 +0000 (-0800) Subject: lib: child_process spawn handle ENOENT correctly X-Git-Tag: v0.11.10~63 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9ba0d905b0da23d540c23b073d794989612d4664;p=platform%2Fupstream%2Fnodejs.git lib: child_process spawn handle ENOENT correctly child_process spawn wasn't handlig ENOENT correctly on Windows. This is half a fix for test-child-process-cwd.js. The other half is going into libuv. --- diff --git a/lib/child_process.js b/lib/child_process.js index 96193a8..75a637e 100644 --- a/lib/child_process.js +++ b/lib/child_process.js @@ -952,10 +952,7 @@ ChildProcess.prototype.spawn = function(options) { var err = this._handle.spawn(options); - if (!constants) - constants = process.binding('constants'); - - if (-err == constants.ENOENT) { + if (err == uv.UV_ENOENT) { process.nextTick(function() { self._handle.onexit(err); });