<br><div class="gmail_quote">2013/2/1 Charles-François Natali <span dir="ltr"><<a href="mailto:cf.natali@gmail.com" target="_blank">cf.natali@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">>> dup2(oldfd, newfd) closes oldfd.<br>
><br>
> No, it doesn't close oldfd.<br>
><br>
> It may close newfd if it was already open.<br>
<br>
</div>(I guess that's what he meant).<br>
<br>
Anyway, only dup2() should probably release the GIL.<br>
<br>
One reasonable heuristic is to check the man page: if the syscall can<br>
return EINTR, then the GIL should be released.</blockquote><div><br></div><div>Should the call be retried in the EINTR case?</div><div>(After a <span style="white-space:pre-wrap">PyErr_CheckSignals)</span></div></div><br>
-- <br>Amaury Forgeot d'Arc