[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt] [PATCH] retry poll() in EINTR case in virPipeReadUntilEOF



I saw a few messages:

libvir: error : internal error poll error: Interrupted system call

during daemon-conf tests. The messages come from virPipeReadUntilEOF. I think the intention is that this case should be retried. Patch attached.

Dave
diff --git a/src/util.c b/src/util.c
index da26009..31a9702 100644
--- a/src/util.c
+++ b/src/util.c
@@ -473,7 +473,7 @@ virPipeReadUntilEOF(virConnectPtr conn, int outfd, int errfd,
     while(!(finished[0] && finished[1])) {
 
         if (poll(fds, ARRAY_CARDINALITY(fds), -1) < 0) {
-            if (errno == EAGAIN)
+            if (errno == EAGAIN || errno == EINTR)
                 continue;
             goto pollerr;
         }

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]