ChildProcess 类


ChildProcess 类的实例都是 EventEmitter,表示衍生的子进程。

ChildProcess 的实例不直接创建,而是使用 child_process.spawn()child_process.exec()child_process.execFile()child_process.fork() 创建 ChildProcess 实例。

Instances of the ChildProcess class are EventEmitters that represent spawned child processes.

Instances of ChildProcess are not intended to be created directly. Rather, use the child_process.spawn(), child_process.exec(), child_process.execFile(), or child_process.fork() methods to create instances of ChildProcess.