worker.kill()

worker.kill([signal='SIGTERM'])

  • signal <String> Name of the kill signal to send to the worker process.

This function will kill the worker. In the master, it does this by disconnecting the worker.process, and once disconnected, killing with signal. In the worker, it does it by disconnecting the channel, and then exiting with code 0.

Causes .suicide to be set.

This method is aliased as worker.destroy() for backwards compatibility.

Note that in a worker, process.kill() exists, but it is not this function, it is kill.

doc_Nodejs
2016-04-30 04:43:13
Comments
Leave a Comment

Please login to continue.