[PATCH 3/5] copy_to_log(): use fdopen_with_retry()
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
---
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