[Twisted-Python] twisted.spread PB over a ProcessProtocol

exarkun at twistedmatrix.com exarkun at twistedmatrix.com
Mon Aug 17 21:50:05 EDT 2009

On 15 Aug, 12:36 pm, thomas at apestaart.org wrote:
>c) on hitting ctrl-c, tracebacks are generated, due to this block of
>        # At least on OS X 10.4, exiting while stdout is non-blocking
>        # result in data loss.  For some reason putting the file
>        # 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 
>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?


More information about the Twisted-Python mailing list