worker.process


所有工作进程都是使用 child_process.fork() 创建,此函数返回的对象存储为 .process。 在工作进程中,存储了全局的 process

请参阅:子进程模块

如果 'disconnect' 事件发生在 process 并且 .exitedAfterDisconnect 不是 true,则工作进程将调用 process.exit(0)。 这可以防止意外断开连接。

All workers are created using child_process.fork(), the returned object from this function is stored as .process. In a worker, the global process is stored.

See: Child Process module.

Workers will call process.exit(0) if the 'disconnect' event occurs on process and .exitedAfterDisconnect is not true. This protects against accidental disconnection.