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

Zachary Turner zturner at google.com
Tue Nov 11 15:53:42 PST 2014


>>! In D6204#18, @clayborg wrote:
> I would vote to define the options struct in ConnectionFileDescriptor and have it not be an argument to the constructor, but to the connect method:
> 
> ConnectionFileDescriptor::Connect(const char *s, Error *error_ptr, const Options &options);
> 
> Make sure there is a default constructor for the Options class that sets m_child_processes_inherit to true;
> 
> And then pass the options from ConnectionFileDescriptor::Connect() down into all of the Socket::*Connect() calls

Wouldn't it be a little weird having a parameter on the Connect() method, which would then require modifying the base Connection class which is non-specific to files?

http://reviews.llvm.org/D6204






More information about the lldb-commits mailing list