From 93a8274fc78abe78284398e1947a8b6c1c9ba611 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 26 Sep 2008 08:27:54 +0200 Subject: [PATCH] ignore SIGPIPE Ignore SIGPIPE, and handle errno==EPIPE instead. --- src/main.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/main.c b/src/main.c index 2d2b07c..28cce93 100644 --- a/src/main.c +++ b/src/main.c @@ -421,6 +421,15 @@ main(int argc, const char *argv[]) exit(EXIT_FAILURE); } + /* ignore SIGPIPE */ + + act.sa_flags = SA_RESTART; + act.sa_handler = SIG_IGN; + if (sigaction(SIGWINCH, &act, NULL) < 0) { + perror("sigaction(SIGWINCH)"); + exit(EXIT_FAILURE); + } + ncu_init(); #ifdef ENABLE_LYRICS_SCREEN -- 2.30.2