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.
This commit is contained in:
Alexis Campailla 2013-12-04 11:04:47 -08:00 committed by Timothy J Fontaine
parent 4bd5f35889
commit 9ba0d905b0

View File

@ -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);
});