Capture sigpipes

This commit is contained in:
Quentin 2020-01-23 19:56:43 +01:00
parent fbef0f4628
commit ea35a8dd93

View file

@ -43,6 +43,7 @@ void signal_init(struct evt_core_ctx* evts) {
sigaddset(&mask, SIGINT); sigaddset(&mask, SIGINT);
sigaddset(&mask, SIGQUIT); sigaddset(&mask, SIGQUIT);
sigaddset(&mask, SIGTERM); sigaddset(&mask, SIGTERM);
sigaddset(&mask, SIGPIPE);
if (sigprocmask(SIG_BLOCK, &mask, NULL) == -1) { if (sigprocmask(SIG_BLOCK, &mask, NULL) == -1) {
perror("sigprocmask"); perror("sigprocmask");
exit(EXIT_FAILURE); exit(EXIT_FAILURE);