Although node.js does not document this in the API, you can read / write these streams with the file descriptor index number using fs.read and fs.write .
I did not find anything from checking the process object, which indicates that these stdios are available for the child process, as far as I know, you can not determine whether these stdios are available from the child.
However, if you know for sure that your child process will be created using these stdios, you can use the read / write functions as follows:
var fd_index = 3; fs.write(fd_index, new Buffer(data, 'utf8'), 0, data.length, null, function(err, bytesWritten, buffer) { if(err) return failure(); else ...
source share