On 15 Aug, 12:36 pm, tho...@apestaart.org wrote:
>[snip]
>
>c) on hitting ctrl-c, tracebacks are generated, due to this block of
>code:
>        # At least on OS X 10.4, exiting while stdout is non-blocking
>can
>        # result in data loss.  For some reason putting the file
>descriptor
>        # back into blocking mode seems to resolve this issue.
>        fdesc.setBlocking(self.fd)
>
>The exception is EBADF.
>
>That code looks suspicious to me - shouldn't it be at least checking 
>for
>exceptions there ? the fd could already be closed IMO.

I think the code was written with the assumption that the fd couldn't 
possibly by closed by that point.  If you have an example where this 
assumption is invalid, cool!  Any chance of shortening the code to just 
highlight this point?

Jean-Paul

_______________________________________________
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

Reply via email to