<div dir="ltr">btw on this one:<div>> <span style="font-family:arial,sans-serif;font-size:13px">TestStepNoDebug.py</span></div><div><br></div><div>I disabled the tests in that file that were failing intermittently for me, early today.</div>
<div><br></div><div>I haven't been seeing this one at all:</div><div>> <span style="font-family:arial,sans-serif;font-size:13px">TestCommandRegex.py</span></div><div><span style="font-family:arial,sans-serif;font-size:13px"><br>
</span></div><div>Regarding the patch, I ran the full test suite twice without any errors on Ubuntu 12.04 x86_64. The changes look good here.  I see quite a bit of code for handling Windows properly - have you verified it works okay there, Piotr?</div>
<div><br></div><div><div>Greg - could you give this a whirl on MacOSX and make sure it looks good to you?  Also see Piotr's springboard notes above.</div></div><div><br></div><div>Thanks,</div><div>Todd</div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Mar 25, 2014 at 1:43 PM, Todd Fiala <span dir="ltr"><<a href="mailto:tfiala@google.com" target="_blank">tfiala@google.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Looking at this now.</div><div class="gmail_extra"><br><br><div class="gmail_quote"><div><div class="h5">
On Sat, Mar 22, 2014 at 8:43 AM, Piotr Rak <span dir="ltr"><<a href="mailto:piotr.rak@gmail.com" target="_blank">piotr.rak@gmail.com</a>></span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr"><div>Hi,</div><div><br></div><div>I've noticed that we leak file descriptors, since we don't use O_CLOEXEC when opening files.</div>

<div>I've changed lldb_utility::PseudoTerminal, debugserver version of it and lldb_private::File to set it while opening by default.</div>
<div><br></div><div>This can be disabled by defining:</div><div>LLDB_DISABLE_O_CLOEXEC and LLDB_DISABLE_DUPFD_CLOEXEC, currently not integrated with any filesystem.</div><div>It also should compile if O_CLOEXEC and F_DUPFD_CLOEXEC aren't defined, and give compilation warning.</div>


<div><br></div><div>Also added new File open option:</div><div>eOpenOptionInheritOnExecPosixFD that makes it fallback to old behavior, however in whole code base it was not required, and could be removed...<br></div><div>


<br></div><div>I went pretty carefully through fork()/exec() and posix_spawn() codepaths to ensure that everything is OK, and it looked it is, but might have missed something.</div><div>None of them required changes, from what I have noticed, since use dup2 or posix_spawnattr_add*.</div>


<div><br></div><div>If any of your out of tree code needs to be adjusted, PseudoTerminal::Fork looks like good example how to pass fd without leaking.</div><div><br></div><div>I've tested linux amd64 and haven't noticed any regressions comparing to trunk, but some tests fail in non-deterministic way, so could mask it...</div>


<div><br></div><div>Most notably:</div><div><div>TestStepNoDebug.py </div><div>TestCommandRegex.py</div></div><div><br></div><div>Managed to make them fail with and without the patch running in separate.</div><div><br></div>


<div>I've  possibly broke debugserver when WITH_SPRINGBOARD is defined for launch code path.</div><div>I don't know SBSLaunchApplicationForDebugging semantics, and have no idea how to fix it, beside disabling it for PseudoTerminal if this option is defined.</div>


<div>Those changes are not strictly required for debugserver yet I have made them for completeness.</div><div><br></div><div>Both raw diff and git patch are attached.</div><div><br></div>Please test attached, and report back if any problems are noticed.<div>


<br></div><div>Cheers,</div><div>/Piotr</div><div><br></div><div>PS.</div><div>@Greg, sorry that it took longer than I thought it will.</div></div>
<br></div></div>_______________________________________________<br>
lldb-dev mailing list<br>
<a href="mailto:lldb-dev@cs.uiuc.edu" target="_blank">lldb-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev</a><br>
<br></blockquote></div><span class="HOEnZb"><font color="#888888"><br><br clear="all"><div><br></div>-- <br><div dir="ltr"><table cellspacing="0" cellpadding="0" style="color:rgb(136,136,136);font-family:'Times New Roman'">
<tbody><tr style="color:rgb(85,85,85);font-family:sans-serif;font-size:small">
<td nowrap style="border-top-style:solid;border-top-color:rgb(213,15,37);border-top-width:2px">Todd Fiala |</td><td nowrap style="border-top-style:solid;border-top-color:rgb(51,105,232);border-top-width:2px"> Software Engineer |</td>

<td nowrap style="border-top-style:solid;border-top-color:rgb(0,153,57);border-top-width:2px"> <a href="mailto:tfiala@google.com" style="color:rgb(17,85,204)" target="_blank"><span style="background-color:rgb(255,255,204);color:rgb(34,34,34);background-repeat:initial initial">tfiala@google.com</span></a> |</td>

<td nowrap style="border-top-style:solid;border-top-color:rgb(238,178,17);border-top-width:2px"><font color="#1155cc"> <a>650-943-3180</a></font></td></tr></tbody></table><br></div>
</font></span></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr"><table cellspacing="0" cellpadding="0" style="color:rgb(136,136,136);font-family:'Times New Roman'"><tbody><tr style="color:rgb(85,85,85);font-family:sans-serif;font-size:small">
<td nowrap style="border-top-style:solid;border-top-color:rgb(213,15,37);border-top-width:2px">Todd Fiala |</td><td nowrap style="border-top-style:solid;border-top-color:rgb(51,105,232);border-top-width:2px"> Software Engineer |</td>
<td nowrap style="border-top-style:solid;border-top-color:rgb(0,153,57);border-top-width:2px"> <a href="mailto:tfiala@google.com" style="color:rgb(17,85,204)" target="_blank"><span style="background-color:rgb(255,255,204);color:rgb(34,34,34);background-repeat:initial initial">tfiala@google.com</span></a> |</td>
<td nowrap style="border-top-style:solid;border-top-color:rgb(238,178,17);border-top-width:2px"><font color="#1155cc"> <a>650-943-3180</a></font></td></tr></tbody></table><br></div>
</div>