74b6ce43 | 16-Jun-2016 |
Marc-André Lureau <marcandre.lureau@redhat.com> |
socket: unlink unix socket on remove
qemu leaves unix socket files behind when removing a listening chardev or leaving. qemu could clean that up, even if doing so isn't race-free.
Fixes: https://bu
socket: unlink unix socket on remove
qemu leaves unix socket files behind when removing a listening chardev or leaving. qemu could clean that up, even if doing so isn't race-free.
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1347077
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <1466105332-10285-4-git-send-email-marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
b16a44e1 | 07-Mar-2016 |
Daniel P. Berrange <berrange@redhat.com> |
osdep: remove use of socket_error() from all code
Now that QEMU wraps the Win32 sockets methods to automatically set errno upon failure, there is no reason for callers to use the socket_error() meth
osdep: remove use of socket_error() from all code
Now that QEMU wraps the Win32 sockets methods to automatically set errno upon failure, there is no reason for callers to use the socket_error() method. They can rely on accessing errno even on Win32. Remove all use of socket_error() from general code, leaving it as a static method in oslib-win32.c only.
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
show more ...
|
a5897205 | 07-Mar-2016 |
Paolo Bonzini <pbonzini@redhat.com> |
io: implement socket watch for win32 using WSAEventSelect+select
On Win32 we cannot directly poll on socket handles. Instead we create a Win32 event object and associate the socket handle with the e
io: implement socket watch for win32 using WSAEventSelect+select
On Win32 we cannot directly poll on socket handles. Instead we create a Win32 event object and associate the socket handle with the event. When the event signals readyness we then have to use select to determine which events are ready. Creating Win32 events is moderately heavyweight, so we don't want todo it every time we create a GSource, so this associates a single event with a QIOChannel.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
show more ...
|
30fd3e27 | 10-Mar-2016 |
Daniel P. Berrange <berrange@redhat.com> |
io: remove checking of EWOULDBLOCK
Since we now canonicalize WSAEWOULDBLOCK into EAGAIN there is no longer any need to explicitly check EWOULDBLOCK for Win32.
Signed-off-by: Daniel P. Berrange <ber
io: remove checking of EWOULDBLOCK
Since we now canonicalize WSAEWOULDBLOCK into EAGAIN there is no longer any need to explicitly check EWOULDBLOCK for Win32.
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
show more ...
|
de7971ff | 10-Mar-2016 |
Daniel P. Berrange <berrange@redhat.com> |
io: use qemu_accept to ensure SOCK_CLOEXEC is set
The QIOChannelSocket code mistakenly uses the bare accept() function which does not set SOCK_CLOEXEC.
Signed-off-by: Daniel P. Berrange <berrange@r
io: use qemu_accept to ensure SOCK_CLOEXEC is set
The QIOChannelSocket code mistakenly uses the bare accept() function which does not set SOCK_CLOEXEC.
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
show more ...
|
b83b68a0 | 07-Mar-2016 |
Paolo Bonzini <pbonzini@redhat.com> |
io: introduce qio_channel_create_socket_watch
Sockets are not in the same namespace as file descriptors on Windows. As an initial step, introduce separate APIs for file descriptor and socket watches
io: introduce qio_channel_create_socket_watch
Sockets are not in the same namespace as file descriptors on Windows. As an initial step, introduce separate APIs for file descriptor and socket watches.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
e8f117f3 | 12-Feb-2016 |
Daniel P. Berrange <berrange@redhat.com> |
io: convert QIOChannelBuffer to use uint8_t instead of char
The QIOChannelBuffer struct uses a 'char *' for its data buffer. It will give simpler type compatibility with the migration APIs if it use
io: convert QIOChannelBuffer to use uint8_t instead of char
The QIOChannelBuffer struct uses a 'char *' for its data buffer. It will give simpler type compatibility with the migration APIs if it uses 'uint8_t *' instead, avoiding several casts.
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
show more ...
|
ccf1e2dc | 18-Jan-2016 |
Daniel P. Berrange <berrange@redhat.com> |
io: use memset instead of { 0 } for initializing array
Some versions of GCC on OS-X complain about CMSG_SPACE not being constant size, which prevents use of { 0 }
io/channel-socket.c: In function '
io: use memset instead of { 0 } for initializing array
Some versions of GCC on OS-X complain about CMSG_SPACE not being constant size, which prevents use of { 0 }
io/channel-socket.c: In function 'qio_channel_socket_writev': io/channel-socket.c:497:18: error: variable-sized object may not be initialized char control[CMSG_SPACE(sizeof(int) * SOCKET_MAX_FDS)] = { 0 };
The compiler is at fault here, but it is nicer to avoid tickling this compiler bug by using memset instead.
Reviewed-By: John Arbuckle <programmingkidx@gmail.com> Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
show more ...
|