summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJari Vetoniemi <mailroxas@gmail.com>2017-01-23 22:16:58 +0200
committerJari Vetoniemi <mailroxas@gmail.com>2017-01-23 22:16:58 +0200
commit18c055658989375b5c5f6a90d97ebd54c8b351a1 (patch)
tree764690f9aa9c2be63d5d793dfe46adcecd295eec
parent238b64b541d9c37a59a291980e07f0b5d9d9826b (diff)
Ignore sigpipe
-rw-r--r--glcapture.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/glcapture.c b/glcapture.c
index d620fe4..2dd202d 100644
--- a/glcapture.c
+++ b/glcapture.c
@@ -21,6 +21,7 @@
#include <stdio.h>
#include <stdbool.h>
#include <stdint.h>
+#include <signal.h>
#include <unistd.h>
#include <assert.h>
#include <time.h>
@@ -214,6 +215,8 @@ check_and_prepare_stream(struct fifo *fifo, const struct frame_info *info)
}
if (fifo->fd < 0) {
+ signal(SIGPIPE, SIG_IGN);
+
if ((fifo->fd = open(FIFO_PATH, O_WRONLY | O_NONBLOCK | O_CLOEXEC)) < 0)
return false;