From f77b8310c29a05a510b85a623ea79046aa74af84 Mon Sep 17 00:00:00 2001 From: Matthew Flint Date: Mon, 18 Apr 2011 22:10:49 +0100 Subject: [PATCH] revert pipe opening, so open() blocks again if no reader --- hairtunes.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hairtunes.c b/hairtunes.c index 07cec69a..31670c69 100644 --- a/hairtunes.c +++ b/hairtunes.c @@ -705,8 +705,8 @@ void *audio_thread_func(void *arg) { if (pipename) { if (pipe_handle == -1) { - // attempt to open pipe, don't block - pipe_handle = open(pipename, O_WRONLY | O_NDELAY); + // attempt to open pipe - block if there are no readers + pipe_handle = open(pipename, O_WRONLY); } // only write if pipe open (there's a reader)