On 11/12/2007, <b class="gmail_sendername">Guido van Rossum</b> <<a href="mailto:guido@python.org">guido@python.org</a>> wrote:<div><span class="gmail_quote"></span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On Dec 10, 2007 4:07 PM, Gustavo Carneiro <<a href="mailto:gjcarneiro@gmail.com">gjcarneiro@gmail.com</a>> wrote:<br>> On 10/12/2007, Guido van Rossum <<a href="mailto:guido@python.org">guido@python.org</a>> wrote:
<br>><br>> > > Adam & I are now on #python-dev. Can you join?<br>> ><br>> > I think we successfully resolved this. Adam Olsen will produce a patch<br>> > that allows one to specify a single file descriptor to which a zero
<br>> > byte will be written by the C-level signal handler. Twisted and PyGTK<br>> > will have to coordinate about this file descriptor. Glyph believes<br>> > this is possible and sufficient.<br>><br>
> Great that a solution was found at last. But to be honest I don't<br>> understand why my patch (the second one) is not good. Why is it preferable<br>> for libraries to provide their own file descriptor?<br>
<br>So the app is in charge of creating the pipe if it wants it.<br><br>We expect that if the pipe is always created, apps that assume only<br>fds 0, 1 and 2 are open may get confused or accidentally close it,<br>etc.</blockquote>
<div><br>It's the first time I hear about this problem, but sounds plausible.<br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
> Are people concerned about the overhead of always creating a pipe even it<br>> may not be used? Always creating a pipe would at least avoid the need for<br>> any "coordination" between PyGTK and Twisted.
<br><br>I don't think that anyone involved though the need for coordination<br>was an issue.</blockquote><div><br>Yeah. Thinking again on this, I don't think this is a problem, not because coordination between PyGTK and Twisted can be done, but because no such coordination is needed. PyGTK can have one FD, Twisted another FD. Since only one of the main loops can be running, there's no conflict.
<br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Please let this rest. We have a solution.</blockquote><div><br>Sure. :-) <br>
</div></div><br>-- <br>Gustavo J. A. M. Carneiro<br>INESC Porto, Telecommunications and Multimedia Unit<br>"The universe is always one step beyond logic." -- Frank Herbert