Version: 1.0.01.1.0-rc.11.1.0-rc.21.2.0-beta.11.2.0-beta.21.2.0-beta.31.2.0-beta.41.2.0-beta.51.2.0-beta.61.2.0-beta.71.2.0-beta.81.2.0-beta.91.2.0-beta.101.2.0-beta.111.2.0-beta.121.2.0-beta.131.2.0-beta.141.2.0-rc.11.2.0-rc.21.3.01.3.11.3.21.3.31.4.01.5.01.5.11.5.2-rc.11.5.21.5.31.6.01.6.11.6.21.6.31.6.41.6.51.7.01.7.11.7.21.8.01.8.11.8.21.8.31.9.01.10.0-alpha.01.10.0-alpha.11.10.01.11.01.11.12.0.0-alpha.12.0.0-alpha.22.0.0-alpha.32.0.0-rc.12.0.02.0.13.0.0-beta.03.0.0-beta.13.0.0-beta.23.0.0-beta.3
'use strict'
/**
* 强制 stdio 同步输出
* https://github.com/nodejs/node/issues/6456
*
* @param {boolean} blocking 是否同步
* @returns {void}
*/
function setBlocking (blocking) {
[process.stdout, process.stderr].forEach(stream => {
/* istanbul ignore else */
if (stream._handle && typeof stream._handle.setBlocking === 'function') {
stream._handle.setBlocking(blocking)
}
})
module.exports = setBlocking