node-supervisor icon indicating copy to clipboard operation
node-supervisor copied to clipboard

Send SIGTERM instead of a crash

Open binarykitchen opened this issue 12 years ago • 3 comments

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

binarykitchen avatar Jan 26 '13 01:01 binarykitchen

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

iangreenleaf avatar Jan 26 '13 06:01 iangreenleaf

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

Ticket closed.

binarykitchen avatar Jan 26 '13 06:01 binarykitchen

This PR will fix this :)

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

binarykitchen avatar May 30 '14 03:05 binarykitchen