[Python-Dev] Assign to errno allowed?

Thomas Heller thomas.heller@ion-tof.com
Tue, 24 Sep 2002 17:35:00 +0200

> > Also I think it's not worth to fix it, there's no use for select()
> > on windows if you don't use sockets - you have to supply at least
> > one socket descriptor (that's the cause for the second error above).
> OK.
> >  Although it could be argued whether it makes sense to simulate
> > a Linux-compatible select for Windows.
> Nah, it's been like this for a decade.

In the current form, it breaks asyncore - this is what
I wanted to fix in the first place.
asyncore contains this code snippet in the poll() function:

            r,w,e = select.select (r,w,e, timeout)
        except select.error, err:
            if err[0] != EINTR:
            r = []; w = []; e = []

This will fail on Windows if all of r,w,e are empty.
Even if there are active sockets, it may be that this
code is executed with all three lists empty.

How can this be fixed?

I have an SF item at http://www.python.org/sf/611464 discussing this.