From: Richard Jones Date: Sun, 10 May 2009 12:51:51 +0000 (+0100) Subject: Handle EINTR, EAGAIN in select main loop. X-Git-Tag: 1.0.23~4 X-Git-Url: http://git.annexia.org/?a=commitdiff_plain;h=f0a5cd69f92f734b94e2361a939e4a1eb01dad9c;p=libguestfs.git Handle EINTR, EAGAIN in select main loop. --- diff --git a/src/guestfs.c b/src/guestfs.c index 9fd943f..612ac00 100644 --- a/src/guestfs.c +++ b/src/guestfs.c @@ -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;