[Twisted-Python] Re: select(2) is just a hint (Was: Re: ENOBUF and Twisted)

David Bolen db3l at fitlinxx.com
Fri Aug 20 11:47:31 EDT 2004


Andrew Bennetts <andrew-twisted at puzzling.org> writes:

> On Fri, Aug 20, 2004 at 10:30:21AM +0300, Tommi Virtanen wrote:
(...)
> > That's not a safe assumption under UNIX. select(2) is just a hint; writing
> [...]
> > 
> > 	Process 1			Process 2
> > 	select() says fd 4 writable
> > 					select() says fd 4 writable
> > 	write(4, ...) success
> > 					write(4, ...) = -1, EAGAIN
> 
> In this case, at least, I believe the Twisted select reactor still does the
> right thing, because accepting no data is just an extreme case of accepting
> only some data ;)

Which probably gets to the root of the question as to whether or not
the ENOBUFS should be considered as transient a problem as EAGAIN
under Windows (and your prior two points).  Prior to having a
reproduceable test case, I would tend to imagine that the ENOBUFS
would cause a subsequent select to fail to indicate readiness to write,
so treading it like EAGAIN would be a reasonable approach.

-- David





More information about the Twisted-Python mailing list