Handle EINTR, EAGAIN in select main loop.
authorRichard Jones <rjones@redhat.com>
Sun, 10 May 2009 12:51:51 +0000 (13:51 +0100)
committerRichard Jones <rjones@redhat.com>
Sun, 10 May 2009 12:52:49 +0000 (13:52 +0100)
src/guestfs.c

index 9fd943f..612ac00 100644 (file)
@@ -2175,6 +2175,8 @@ select_main_loop_run (guestfs_main_loop *mlv, guestfs_h *g)
     xset2 = ml->xset;
     r = select (ml->max_fd+1, &rset2, &wset2, &xset2, NULL);
     if (r == -1) {
+      if (errno == EINTR || errno == EAGAIN)
+       continue;
       perrorf (g, "select");
       ml->is_running = 0;
       return -1;