From: Max Kellermann Date: Fri, 26 Sep 2008 06:27:54 +0000 (+0200) Subject: ignore SIGPIPE X-Git-Tag: v0.12_alpha1~138 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=93a8274fc78abe78284398e1947a8b6c1c9ba611;p=ncmpc.git ignore SIGPIPE Ignore SIGPIPE, and handle errno==EPIPE instead. --- 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