mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07:00
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>
This commit is contained in:
+2
-2
@@ -343,8 +343,8 @@ qio_channel_socket_accept(QIOChannelSocket *ioc,
|
||||
|
||||
retry:
|
||||
trace_qio_channel_socket_accept(ioc);
|
||||
cioc->fd = accept(ioc->fd, (struct sockaddr *)&cioc->remoteAddr,
|
||||
&cioc->remoteAddrLen);
|
||||
cioc->fd = qemu_accept(ioc->fd, (struct sockaddr *)&cioc->remoteAddr,
|
||||
&cioc->remoteAddrLen);
|
||||
if (cioc->fd < 0) {
|
||||
trace_qio_channel_socket_accept_fail(ioc);
|
||||
if (socket_error() == EINTR) {
|
||||
|
||||
Reference in New Issue
Block a user