select() problem, not timing out

Donn Cave donn at
Thu Jul 29 22:16:23 CEST 2004

In article <da4423a8.0407291047.5dbc12e at>,
 shifflett at (D. Shifflett) wrote:
> Hi all,
> I am having trouble with a program that ran fine on
> Python 2.0 (#0, Mar 1 2001, 01:47:55)
> [GCC 2.95.1 19990816 (release)] on linux2
> but will not work on
> Python 2.3.2 (#1, Oct  8 2003, 17:33:47)
> [GCC 3.3.2 20030908 (Debian prerelease)] on linux2
> These are part of Familiar Linux running on a iPAQ.
> The program has a button to cause a packet to be sent to a server,
> the program also has a thread to read packets from the server.
> I send a packet, I get one back, pretty simple.
> I am using select() to wait for packets
> and it isn't functioning as expected.
> select() doesn't return until I have sent a packet
> even though I am using a short timeout (1 second)

You could be running into some kind of bug in select,
but of course statistically the odds are overwhelming
that the bug is in your application.

The code you posted looked OK to me on casual examination,
but it raises some questions I can't answer - for example,
unless I missed something, the "select" function might have
come from "from gtk import *"?

If no one turns up who recognizes this problem, do you
think you could post a complete, minimal program
that exhibits this behavior - no "...", no gtk, etc.?
Might try this with and without threads to see if it
has anything to do with your problem.

   Donn Cave, donn at

More information about the Python-list mailing list