[Python-Dev] Assign to errno allowed?

Gordon McMillan gmcm@hypernet.com
Tue, 24 Sep 2002 12:27:42 -0400


While we're discussing the non-conformance of Window's select,
these 2 errors:

> > select.error: (10093, 'Either the application has not called
> > WSAStartup, or WSAStartup failed')

> > select.error: (10022, 'An invalid argument was supplied')

are about the only errors you'll get from select on Windows.
Where select would return a socket in the errors list on
*nix, on Windows it will come out as readable / writeable, and
it's the socket send / rcv that will find out what the problem
is. Each version of winsock gets a bit better, but (for example),
selecting for write in Win9x-era winsock is essentially a busy-wait.
You'll get the socket back immediately, go to write and get
the Window's EWOULDBLOCK error.

but-heck-it-multitasks-ly-y'rs
-- Gordon
http://www.mcmillan-inc.com/