Message104281
> Well, at the risk of stating the obvious, perhaps the dup() thing
> should be eliminated. The justification for it seems less than clear,
> and apparently it causes some problems.
I've just found another problem while investigating the cause of some
sporadic Windows failures:
http://www.python.org/dev/buildbot/builders/x86%20XP-4%
203.1/builds/718/steps/test/logs/stdio
I've reproduced it on an XP VM and the explanation is that, sometimes,
just after a dup() of a socket, calling getpeername() on the child
socket fails (while getpeername() on the parent succeeds). It seems very
timing-sensitive: if I insert enough code after the dup(), the call to
getpeername() succeeds.
I will fix the buildbot issue by using a different logic (simply, call
getpeername() on the parent rather than the child), but this seems to
confirms that dup() may not be a good idea. |
|
Date |
User |
Action |
Args |
2010-04-26 21:47:53 | pitrou | set | recipients:
+ pitrou, exarkun, janssen, giampaolo.rodola |
2010-04-26 21:47:52 | pitrou | link | issue8524 messages |
2010-04-26 21:47:51 | pitrou | create | |
|