[Lldb-commits] [PATCH] Apply SOCK_CLOEXEC flag to socket API functions in order to avoid handle leakage to a forked child process.

Oleksiy Vyalov ovyalov at google.com
Mon Nov 10 15:21:39 PST 2014

Hi clayborg, sbest,

Launch of a new process copies opened handles from parent process to child.
Setting SOCK_CLOEXEC/FD_CLOEXEC flag on kernel handle should prevent such kind of "resource sharing".
I made corresponding changes only for socket API - if such approach looks reasonable I'm planning to apply similar changes to files (source/Host/common/File.cpp) and pipes (source/Host/posix/PipePosix.cpp).


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D6204.16013.patch
Type: text/x-patch
Size: 3791 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20141110/d60842ab/attachment.bin>

More information about the lldb-commits mailing list