Ticket #2259 defect closed fixed
stdio fails when output redirected to a file
| Reported by: | jknight | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | core | Keywords: | |
| Cc: | spiv | Branch: | branches/stdio-file-redirect-2259 |
| Author: | jknight, exarkun | Launchpad Bug: |
Description
At least on linux. Behavior of other OSes may or may not vary. See attached test case.
It works as expected when running normally. However, when redirecting output to a file, connectionLost gets called immediately.
This is because os.read() throws OSError so enableReadHack=True, but then select always returns readable&writeable for files.
Fixing this properly requires not using that read hack, which means tracking in-use sockets separately from the readable/writable lists (aka #365 and #1662), so we can get close notification.
Attachments
Change History
Note: See
TracTickets for help on using
tickets.

