node子进程程序控制

166 阅读1分钟
  1. 手动控制
spawn options参数: 

{ stdio: 'inherit' }
  1. 程序控制
spawn options参数:

{stdio: ['pipe', 'pipe', 'pipe']}
ch.stdin.write('q\r\n');