Can I also request that the variable *not* be called close_on_exec?.  It is possible to implement an equivalent on Windows, but calling it close on exec will be confusing to people on Windows.  Can we come up with a more generic name?  On Windows this would be called "inherit handles", which to me sounds like a better name than close on exec, but I may be biased.  Is "inherit handles" confusing to people on non-Windows?<div><br></div><div>In other words, I'm proposing<br><div><br></div><div><span style="line-height:19.7999992370605px">virtual lldb::ConnectionStatus ConnectionFileDescriptor::</span><u style="line-height:19.7999992370605px"></u><span style="line-height:19.7999992370605px">Conn</span><span style="line-height:19.7999992370605px">ect(const char *s, Error *error_ptr, bool close_on_exec = true);</span><br></div><div><span style="line-height:19.7999992370605px"><br></span></div><div><span style="line-height:19.7999992370605px">would become</span></div><div><span style="line-height:19.7999992370605px"><br></span></div><div><span style="line-height:19.7999992370605px">virtual lldb::ConnectionStatus ConnectionFileDescriptor::</span><u style="line-height:19.7999992370605px"></u><span style="line-height:19.7999992370605px">Conn</span><span style="line-height:19.7999992370605px">ect(const char *s, Error *error_ptr, bool inherit_handles = false);</span><span style="line-height:19.7999992370605px"><br></span></div><div><span style="line-height:19.7999992370605px"><br></span></div><div><span style="line-height:19.7999992370605px"><br></span></div></div><br><div class="gmail_quote">On Mon Nov 10 2014 at 4:45:46 PM Greg Clayton <<a href="mailto:clayborg@gmail.com">clayborg@gmail.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I don't think this is a good default. Sockets are often used for IPC after fork/exec, but I would like to make a way to specify close on exec by supplying a boolean argument to ConnectionFileDescriptor() when creating it. Then clients will opt into this by force as they will need to supply the argument. Or you can make a default argument that defaults to true for "close_on_exec".<br>
<br>
So maybe a boolean to:<br>
<br>
    virtual lldb::ConnectionStatus ConnectionFileDescriptor::<u></u>Connect(const char *s, Error *error_ptr, bool close_on_exec = true);<br>
<br>
Then this gets passed along to whomever creates the IOObject subclass and they each do the right thing if they can<br>
<br>
<a href="http://reviews.llvm.org/D6204" target="_blank">http://reviews.llvm.org/D6204</a><br>
<br>
<br>
</blockquote></div>