Always ignore SIGPIPE

MSG_DONTWAIT doesn't work quite right on OmniOS / Solaris, so also
disable SIGPIPE.
This commit is contained in:
Christopher Wellons 2019-02-03 15:31:16 -05:00
parent 2bd2b3ca92
commit 7ac1fbff3b

View File

@ -494,13 +494,14 @@ main(int argc, char **argv)
/* Log configuration */
config_log(&config);
/* Install the signal handlers */
signal(SIGPIPE, SIG_IGN);
{
struct sigaction sa = {.sa_handler = sigterm_handler};
int r = sigaction(SIGTERM, &sa, 0);
if (r == -1)
die();
}
{
struct sigaction sa = {.sa_handler = sighup_handler};
int r = sigaction(SIGHUP, &sa, 0);