From: Michael Haggerty Date: Thu, 05 Mar 2015 16:07:47 GMT Subject: [PATCH 3/5] copy_to_log(): use fdopen_with_retry() Message-ID: <1425571669-22800-4-git-send-email-mhagger@alum.mit.edu> In-Reply-To: <1425571669-22800-1-git-send-email-mhagger@alum.mit.edu> Signed-off-by: Michael Haggerty --- daemon.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/daemon.c b/daemon.c index c3edd96..1d76ccf 100644 --- a/daemon.c +++ b/daemon.c @@ -421,8 +421,8 @@ static void copy_to_log(int fd) struct strbuf line = STRBUF_INIT; FILE *fp; - fp = fdopen(fd, "r"); - if (fp == NULL) { + fp = fdopen_with_retry(fd, "r"); + if (!fp) { logerror("fdopen of error channel failed"); close(fd); return; -- 2.1.4