Child Process: fork stdio option doesn't support the String variant that spawn does #10793
Closed
Description
Version: v7.4.0
Platform: Windows 64 bit
The following code forks a script but all it's stdio objects are null
index.js
var child = childProcess.fork('./userapp/test.js', [], {
stdio: 'pipe'
});
console.log('stdio', child.stdio);
test.js
var count = 0;
setInterval(function () {
if (count == 3) process.exit(1);
console.log('test: ' + count);
count++;
}, 1000, 0);
console output:
stdio [ null, null, null, null ]
test: 0
test: 1
test: 2
Also i've tried to set the childs stdio with stdio: [stream, stream, stream]
but this didn't work and the child used the parents stream to output