Message237818
If I have a read-only fd, and I try to open it as 'w' with
os.fdopen(fd, 'w'),
the operation raises on linux but succeeds on windows. Python relies on the underlying clib's fdopen to return an error, which glibc does, but MSVC happily closes the original fd and returns with no error.
Would a patch to fix this be welcomed? A test demonstrating the issue is attached. The fix would be to check that the mode requested matches the mode of the argument fd.
Related issues #22259 and #21191 did not consider this case |
|
Date |
User |
Action |
Args |
2015-03-10 22:41:49 | mattip | set | recipients:
+ mattip, tim.golden, zach.ware, steve.dower |
2015-03-10 22:41:49 | mattip | set | messageid: <1426027309.83.0.475753794617.issue23634@psf.upfronthosting.co.za> |
2015-03-10 22:41:49 | mattip | link | issue23634 messages |
2015-03-10 22:41:49 | mattip | create | |
|