workers: unref all streams.

This commit is contained in:
Christopher Jeffrey 2017-05-01 11:41:05 -07:00
parent d3cfad0c64
commit 52bf0d420a
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD

View File

@ -537,7 +537,11 @@ Worker.prototype._initChildProcess = function _initChildProcess() {
var options = { stdio: 'pipe', env: env };
this.child = cp.spawn(file, argv, options);
this.child.unref();
this.child.stdin.unref();
this.child.stdout.unref();
this.child.stderr.unref();
this.child.on('error', function(err) {
self.emit('error', err);