mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 08:13:54 -06: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:
parent
b83b68a013
commit
de7971ffb9
1 changed files with 2 additions and 2 deletions
|
@ -343,7 +343,7 @@ qio_channel_socket_accept(QIOChannelSocket *ioc,
|
||||||
|
|
||||||
retry:
|
retry:
|
||||||
trace_qio_channel_socket_accept(ioc);
|
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);
|
&cioc->remoteAddrLen);
|
||||||
if (cioc->fd < 0) {
|
if (cioc->fd < 0) {
|
||||||
trace_qio_channel_socket_accept_fail(ioc);
|
trace_qio_channel_socket_accept_fail(ioc);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue