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:
parent
b83b68a013
commit
de7971ffb9
@ -343,7 +343,7 @@ qio_channel_socket_accept(QIOChannelSocket *ioc,
|
||||
|
||||
retry:
|
||||
trace_qio_channel_socket_accept(ioc);
|
||||
cioc->fd = accept(ioc->fd, (struct sockaddr *)&cioc->remoteAddr,
|
||||
cioc->fd = qemu_accept(ioc->fd, (struct sockaddr *)&cioc->remoteAddr,
|
||||
&cioc->remoteAddrLen);
|
||||
if (cioc->fd < 0) {
|
||||
trace_qio_channel_socket_accept_fail(ioc);
|
||||
|
Loading…
Reference in New Issue
Block a user