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.
Created on 2010年10月30日 14:59 by bbrazil, last changed 2022年04月11日 14:57 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| fileio_fd_leak.patch | bbrazil, 2010年10月30日 14:59 | |||
| fileio_fd_leak_v2.patch | bbrazil, 2010年10月30日 15:28 | |||
| Messages (4) | |||
|---|---|---|---|
| msg119992 - (view) | Author: Brian Brazil (bbrazil) * | Date: 2010年10月30日 14:59 | |
fileio_init will leak a fd if you open a file for append that isn't seekable. We should close this fd before returning the failure. The attached patch fixes this and a resource warning in the tests, but I'm unsure if it'd be better to use internal_close. I'd want the error from the seek rather than any potential error from the close, so I think this is okay. Regrtest is happy. |
|||
| msg119993 - (view) | Author: Antoine Pitrou (pitrou) * (Python committer) | Date: 2010年10月30日 15:06 | |
It should be closed only if closefd is true. Does it fix a warning in the test suite? Otherwise I think it would need its own test. |
|||
| msg119994 - (view) | Author: Brian Brazil (bbrazil) * | Date: 2010年10月30日 15:28 | |
Version 2 of the patch is attached.
This fixes a warning at line 256 in test_fileio.py:
f = _FileIO("/dev/tty", "a")
on my Hardy machine.
|
|||
| msg119999 - (view) | Author: Antoine Pitrou (pitrou) * (Python committer) | Date: 2010年10月30日 16:19 | |
Committed in r85982, thank you. I will backport later. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:08 | admin | set | github: 54462 |
| 2010年10月30日 16:19:36 | pitrou | set | status: open -> closed resolution: fixed messages: + msg119999 stage: patch review -> resolved |
| 2010年10月30日 15:28:06 | bbrazil | set | files:
+ fileio_fd_leak_v2.patch messages: + msg119994 |
| 2010年10月30日 15:06:55 | pitrou | set | nosy:
+ pitrou messages: + msg119993 |
| 2010年10月30日 15:02:57 | pitrou | set | nosy:
+ amaury.forgeotdarc, benjamin.peterson stage: patch review type: resource usage versions: + Python 3.1, Python 2.7, Python 3.2, - Python 3.3 |
| 2010年10月30日 14:59:06 | bbrazil | create | |