From: schorsch at schorsch.com (Georg Mischler) Date: Tue, 06 Apr 1999 16:35:14 GMT Subject: Select weirdness on Solaris 2.4 References: <199904011625.LAA28154@python.org> <199904011702.MAA06784@eric.cnri.reston.va.us> Message-ID: <7edd41$5gi$1@nnrp1.dejanews.com> Content-Length: 1741 X-UID: 230 In article <199904011702.MAA06784 at eric.cnri.reston.va.us>, Guido van Rossum wrote: > Georg Mischler wrote: > > > So the question now turns away from asyncore and towards python > > internals. Can anyone spot the crucial difference between the > > following C (compiled with -lsocket -lnsl) and what python does > > with the 6 lines from above? > > Here's another suggestion. Aren't there two socket implementations in > Solaris? One SysV compatible and one BSD compatible? Does Python > link with the same set of libraries as your little C program? Thanks for all the suggestions from everybody. I finally gave up when I found the following in asyncore.py: if os.name == 'mac': # The macintosh will select a listening socket for # write if you let it. What might this mean? def writable (self): return not self.accepting else: def writable (self): return 1 This showed me that the problem is not unique to my system, and also pointed me to the solution. My derived class now overwrites: def writable(self): return not self.accepting Since I know that the dispatcher will never write anything to any socket (why should it?), this is save and will end my headaches. I still don't understand the behaviour of select in this case, but I leave that to the socket experts to ponder... as-long-as-it-works-don't-ask-why-ly yrs -schorsch -- Georg Mischler -- simulation developper -- schorsch at schorsch.com +schorsch.com+ -- lighting design tools -- http://www.schorsch.com/ -----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own