petruisfan / node-supervisor

Other
3.76k stars 260 forks source link

Send SIGTERM instead of a crash #88

Open binarykitchen opened 11 years ago

binarykitchen commented 11 years ago

Howdy

Do you think you could add a new option to send a SIGTERM to the node.js app instead of crashing it?

Like that I would be able to build in a mechanism respecting current connections, shutting them down gracefully with a 502 header message like "Server is in the process of restarting".

What do you think?

Cheers Michael

iangreenleaf commented 11 years ago

supervisor is calling process.kill, which sends a SIGTERM by default...

binarykitchen commented 11 years ago

You're right. Just played around and I can gracefully close the app with your supervisor.

Ticket closed.

binarykitchen commented 10 years ago

This PR will fix this :)

https://github.com/isaacs/node-supervisor/pull/132