This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author amaury.forgeotdarc
Recipients amaury.forgeotdarc, piro
Date 2008-02-14.16:50:55
SpamBayes Score 0.0744668
Marked as misclassified No
Message-id <1203007857.16.0.167310629835.issue2113@psf.upfronthosting.co.za>
In-reply-to
Content
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...
History
Date User Action Args
2008-02-14 16:50:57amaury.forgeotdarcsetspambayes_score: 0.0744668 -> 0.0744668
recipients: + amaury.forgeotdarc, piro
2008-02-14 16:50:57amaury.forgeotdarcsetspambayes_score: 0.0744668 -> 0.0744668
messageid: <1203007857.16.0.167310629835.issue2113@psf.upfronthosting.co.za>
2008-02-14 16:50:56amaury.forgeotdarclinkissue2113 messages
2008-02-14 16:50:56amaury.forgeotdarccreate