git.annexia.org
/
libguestfs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
09c42a9
)
Increase the wait time for vmchannel socket to appear (fix for slow / heavily-loaded...
author
Richard Jones
<rjones@redhat.com>
Wed, 13 May 2009 10:43:21 +0000
(11:43 +0100)
committer
Richard Jones
<rjones@redhat.com>
Wed, 13 May 2009 10:43:21 +0000
(11:43 +0100)
src/guestfs.c
patch
|
blob
|
history
diff --git
a/src/guestfs.c
b/src/guestfs.c
index
612ac00
..
43571af
100644
(file)
--- a/
src/guestfs.c
+++ b/
src/guestfs.c
@@
-906,10
+906,9
@@
guestfs_launch (guestfs_h *g)
addr.sun_path[UNIX_PATH_MAX-1] = '\0';
tries = 100;
addr.sun_path[UNIX_PATH_MAX-1] = '\0';
tries = 100;
+ /* Always sleep at least once to give qemu a small chance to start up. */
+ usleep (10000);
while (tries > 0) {
while (tries > 0) {
- /* Always sleep at least once to give qemu a small chance to start up. */
- usleep (10000);
-
r = connect (g->sock, (struct sockaddr *) &addr, sizeof addr);
if ((r == -1 && errno == EINPROGRESS) || r == 0)
goto connected;
r = connect (g->sock, (struct sockaddr *) &addr, sizeof addr);
if ((r == -1 && errno == EINPROGRESS) || r == 0)
goto connected;
@@
-917,6
+916,7
@@
guestfs_launch (guestfs_h *g)
if (errno != ENOENT)
perrorf (g, "connect");
tries--;
if (errno != ENOENT)
perrorf (g, "connect");
tries--;
+ usleep (100000);
}
error (g, "failed to connect to vmchannel socket");
}
error (g, "failed to connect to vmchannel socket");