Amaury Forgeot d'Arc added the comment:

First, this patch has a possible bug: if select() fails on the first
iteration, wlist is left undefined, and the next instruction "if
self.stdin in wlist" will fail.

Second, I think that is is not a good idea to simply exit the loop on
the first signal. In your script, select() is interrupted because of
SIGALRM (try removing the call to os.kill), and there may be more data
to read.

A possible solution could be:

try:
    ...select.select()...
except select.error, e:
    if e.args[0] == errno.EINTR:
        continue  # try again
    else:
        raise
else:
    ...exchange data...

----------
nosy: +amaury.forgeotdarc

__________________________________
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue2113>
__________________________________
_______________________________________________
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to