This repository was archived by the owner on Apr 22, 2023. It is now read-only.
This repository was archived by the owner on Apr 22, 2023. It is now read-only.
Cluster API: worker process can't get 'SIGTERM' signal when being killed #5766
Closed
Description
cluster = require "cluster"
if cluster.isMaster
for i in [0...4]
cluster.fork()
setTimeout ->
worker.kill() for id, worker of cluster.workers
, 2000
else
process.on 'SIGTERM', ->
console.log 'SIGTERM'
setTimeout (->), 100000
Outputs nothing. I think it should log SIGTERM
4 times.
What's wrong with the above code?
Metadata
Metadata
Assignees
Labels
No labels