webpack-dashboard
webpack-dashboard copied to clipboard
Handle SIGQUIT
For some reason the process doesn't quit with Ctrl + \
but does with Ctrl + c
.
SIGQUIT is the dump core signal. The terminal sends it to the foreground process when the user presses ctrl-\. The default behavior is to terminate the process and dump core, but it can be caught or ignored. The intention is to provide a mechanism for the user to abort the process.
@kenwheeler For some reason the following piece of code isn't being recognised by Node. Also, listening for the 'C-' event doesn't work since the backslash will need to be escaped (and isn't recognised as a valid key combination anymore).
process.on("SIGQUIT", function () {
process.exit(0);
});
Other terminal apps, like Node itself, don't quit with Ctrl + \
either. Is this still a valid way to quit processes?
express
and webpack --watch
work with Ctrl + \
. So does irb
, yes
, grep
, etc. But you are correct that the node REPL does not support it. Maybe it should be handled upstream on node?