From 23f5f35da2bfb8e5162419bf84627714f920da2c Mon Sep 17 00:00:00 2001 From: David Goulet Date: Tue, 18 Dec 2012 15:21:33 -0500 Subject: [PATCH] Fix: handle consumer data pipe read error Signed-off-by: David Goulet --- src/common/consumer.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/common/consumer.c b/src/common/consumer.c index c74d1f7ae..1af69ef93 100644 --- a/src/common/consumer.c +++ b/src/common/consumer.c @@ -2364,6 +2364,11 @@ void *consumer_thread_data_poll(void *data) pipe_readlen = read(ctx->consumer_data_pipe[0], &new_stream, sizeof(new_stream)); } while (pipe_readlen == -1 && errno == EINTR); + if (pipe_readlen < 0) { + PERROR("read consumer data pipe"); + /* Continue so we can at least handle the current stream(s). */ + continue; + } /* * If the stream is NULL, just ignore it. It's also possible that -- 2.34.1