Closed jsumners closed 8 years ago
How does runit
send the kill signal? Is sv stop
supposed to stop NodeBB altogether?
@julianlam from the manpage:
If the service is running, send it the TERM signal, and the CONT signal. If ./run exits, start ./finish if it exists. After it stops, do not restart service.
So, yes, sv stop
is supposed to completely terminate the NodeBB process altogether.
Oops, somehow exec
got missing from my init script. Nothing to see here. Move along.
Void Linux uses runit as its init system. This init system is perfect for running node.js based web services. However, NodeBB does not work well with it.
Using the documentation for Upstart I created my runit service to start NodeBB with:
This nets me the process tree:
That is correct and as it should be. After clicking "reload" and "restart" in NodeBB's admin panel the process tree remains the same; that's perfect.
The issue is when using
runit
to manage the process. Issuing asv stop ~/services/nodebb
results in the process tree:Notice that the
node
process is no longer a child ofrunsv
-- the process manager forrunit
. This meansrunit
cannot manage the process. Indeed, it was unable to TERM the process to begin with. Process number 25389 should have received the TERM signal and quit when I issued thesv stop
command.