Handle SIGINT

Gracefully exit on SIGINT, like we do for SIGTERM.
This commit is contained in:
Simon Ser 2020-08-10 14:33:20 +02:00 committed by Brian Ashworth
parent 45aa5c104c
commit 6991ac8c70

View file

@ -367,6 +367,7 @@ int main(int argc, char **argv) {
// handle SIGTERM signals // handle SIGTERM signals
signal(SIGTERM, sig_handler); signal(SIGTERM, sig_handler);
signal(SIGINT, sig_handler);
// prevent ipc from crashing sway // prevent ipc from crashing sway
signal(SIGPIPE, SIG_IGN); signal(SIGPIPE, SIG_IGN);