aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-09-26 08:27:54 +0200
committerMax Kellermann <max@duempel.org>2008-09-26 08:27:54 +0200
commit93a8274fc78abe78284398e1947a8b6c1c9ba611 (patch)
tree440367b0ff57c7c39f1eaadae1cc2f0d46f45653 /src
parentb17deae444722e88838193128ab231dd402a3d5c (diff)
downloadmpd-93a8274fc78abe78284398e1947a8b6c1c9ba611.tar.gz
mpd-93a8274fc78abe78284398e1947a8b6c1c9ba611.tar.xz
mpd-93a8274fc78abe78284398e1947a8b6c1c9ba611.zip
ignore SIGPIPE
Ignore SIGPIPE, and handle errno==EPIPE instead.
Diffstat (limited to 'src')
-rw-r--r--src/main.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index 2d2b07c24..28cce938f 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