The QIOChannelSocket code mistakenly uses the bare accept()
function which does not set SOCK_CLOEXEC.
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
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) {