mirror of
https://github.com/Genymobile/scrcpy.git
synced 2025-09-02 15:45:42 +00:00
Set CLOEXEC flag on sockets
If SOCK_CLOEXEC exists, then set the flag on socket creation. Otherwise, use fcntl() (or SetHandleInformation() on Windows) to set the flag afterwards. This avoids the sockets to be inherited in child processes. Refs #2783 <https://github.com/Genymobile/scrcpy/pull/2783>
This commit is contained in:
parent
904f0ae61e
commit
b90c89766b
2 changed files with 55 additions and 1 deletions
|
@ -149,6 +149,9 @@ foreach f : check_functions
|
|||
endif
|
||||
endforeach
|
||||
|
||||
conf.set('HAVE_SOCK_CLOEXEC', host_machine.system() != 'windows' and
|
||||
cc.has_header_symbol('sys/socket.h', 'SOCK_CLOEXEC'))
|
||||
|
||||
# the version, updated on release
|
||||
conf.set_quoted('SCRCPY_VERSION', meson.project_version())
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue