Hi, in a log (rhel) and also in the debug messages, there sometimes appear messages, that a controller could not connect to a socket file (int SpiceController::Connect()). This is caused by the fact, that we try to connect before the socket is present. I added this simple poll loop to wait for the socket file to be created. Any opinions? --- SpiceXPI/src/plugin/controller.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/SpiceXPI/src/plugin/controller.cpp b/SpiceXPI/src/plugin/controller.cpp index b912c27..094f086 100644 --- a/SpiceXPI/src/plugin/controller.cpp +++ b/SpiceXPI/src/plugin/controller.cpp @@ -51,6 +51,8 @@ extern "C" { # include <unistd.h> # include <fcntl.h> # include <sys/socket.h> +# include <sys/types.h> +# include <sys/stat.h> # include <sys/un.h> } @@ -94,6 +96,11 @@ int SpiceController::Connect() } } + // wait for a socket file + struct stat buf; + while (stat(m_name.c_str(), &buf)) + usleep(100000); + struct sockaddr_un remote; remote.sun_family = AF_UNIX; if (m_name.length() + 1 > sizeof(remote.sun_path)) -- Peter Hatina EMEA ENG-Base Operating Systems Red Hat Czech, Brno _______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/spice-devel