* [Qemu-devel] [PATCH] access to -smb directory does not work reliable
@ 2004-12-10 18:20 Juergen Keil
0 siblings, 0 replies; only message in thread
From: Juergen Keil @ 2004-12-10 18:20 UTC (permalink / raw)
To: qemu-devel
A windows guest OS is sometimes unable to mount a "-smb directory", when
qemu runs on a Solaris host.
Problem is the accept() call in qemu that waits for a connect() from the
forked subprocess (the future smbd subprocess). The accept() call is
interrupted by a SIGALRM signal and returns with return value -1 and
errno == EINTR.
qemu does not restart the accept() under these conditions; the -smb directory
cannot be mounted by the Windows guest OS.
Fix:
Index: slirp/misc.c
===================================================================
RCS file: /cvsroot/qemu/qemu/slirp/misc.c,v
retrieving revision 1.4
diff -u -B -r1.4 misc.c
--- slirp/misc.c 10 Oct 2004 18:00:00 -0000 1.4
+++ slirp/misc.c 10 Dec 2004 18:12:32 -0000
@@ -436,7 +440,9 @@
* The only reason this will block forever is if
socket()
* of connect() fail in the child process
*/
- so->s = accept(s, (struct sockaddr *)&addr, &addrlen);
+ do
+ so->s = accept(s, (struct sockaddr *)&addr,
&addrlen);
+ while (so->s < 0 && errno == EINTR);
closesocket(s);
opt = 1;
setsockopt(so->s,SOL_SOCKET,SO_REUSEADDR,(char
*)&opt,sizeof(int));
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2004-12-10 18:32 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-12-10 18:20 [Qemu-devel] [PATCH] access to -smb directory does not work reliable Juergen Keil
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).