从subprocess缓冲stdout / stderr

假设我用合理数量的stdout / stderr启动subprocess:

const k = cp.spawn('bash'); k.stdout.pause(); k.stderr.pause(); setTimeout(function(){ // 20 seconds later, we resume streaming k.stdout.pipe(getDest()); k.stderr.pipe(getDest()); },20000); 

用这个subprocess的stdout / stderr真的被caching在内存中,当我最终恢复stream时,它们都不会丢失。