Skip to content
Snippets Groups Projects
Commit 9cbda7b3 authored by Guoyi Tu's avatar Guoyi Tu Committed by Marc-André Lureau
Browse files

vhost-user: Call qemu_socketpair() instead of socketpair()


As the close-on-exec flags is not set on the file descriptors returned
by socketpair() at default, the fds will survive across exec' function.

In the case that exec' function get invoked, such as the live-update feature
which is been developing, it will cause fd leaks.

To address this problem, we should call qemu_socketpair() to create an pair of
connected sockets with the close-on-exec flag set.

Signed-off-by: default avatarGuoyi Tu <tugy@chinatelecom.cn>
Reviewed-by: default avatarChristian Schoenebeck <qemu_oss@crudebyte.com>
Reviewed-by: default avatarMarc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <7002b12a5fb0a30cd878e14e07da61c36da72913.1661240709.git.tugy@chinatelecom.cn>
parent 3c63b4e9
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment