From be8114e5c5afa461a47f617dad86f8de7b27b6cf Mon Sep 17 00:00:00 2001 From: Charles Date: Wed, 18 Jun 2014 00:44:11 +0200 Subject: [PATCH] child_process: don't throw on EAGAIN Signed-off-by: Fedor Indutny --- lib/child_process.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/child_process.js b/lib/child_process.js index d6017d18ff..e2087c320d 100644 --- a/lib/child_process.js +++ b/lib/child_process.js @@ -1114,7 +1114,9 @@ ChildProcess.prototype.spawn = function(options) { var err = this._handle.spawn(options); - if (err === uv.UV_EMFILE || + // Run-time errors should emit an error, not throw an exception. + if (err === uv.UV_EAGAIN || + err === uv.UV_EMFILE || err === uv.UV_ENFILE || err === uv.UV_ENOENT) { process.nextTick(function() {