From 7ac1fbff3b0d7e3d152ec9ce51e24bb6695b65cf Mon Sep 17 00:00:00 2001 From: Christopher Wellons Date: Sun, 3 Feb 2019 15:31:16 -0500 Subject: [PATCH] Always ignore SIGPIPE MSG_DONTWAIT doesn't work quite right on OmniOS / Solaris, so also disable SIGPIPE. --- endlessh.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/endlessh.c b/endlessh.c index 433b4d1..43c517a 100644 --- a/endlessh.c +++ b/endlessh.c @@ -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);