Code

ignore SIGPIPE
authorMax Kellermann <max@duempel.org>
Fri, 26 Sep 2008 06:27:54 +0000 (08:27 +0200)
committerMax Kellermann <max@duempel.org>
Fri, 26 Sep 2008 06:27:54 +0000 (08:27 +0200)
Ignore SIGPIPE, and handle errno==EPIPE instead.

src/main.c

index 2d2b07c24939380bbc021ac8c5ed124a9bc92eda..28cce938f97813ad103a7c013e89d2a5a21395b0 100644 (file)
@@ -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