Message291151
From the documentation of the io module:
fileno()
Return the underlying file descriptor (an integer) of the stream if it exists. An OSError is raised if the IO object does not use a file descriptor.
However, when passing a file-like object without a file descriptor (that raises OSError when calling f.fileno()) to POpen (for stdout, for example), the raised exception is not handled properly.
(However, on inspection of subprocess code, returning -1 will cause the code to handle this properly)
I'm not sure whether this is an issue in the io module documentation or in the subprocess code.
the core issue seems to be in POpen.get_handles, that seems to expect that -1 is used to signal "no file descriptor available". |
|
Date |
User |
Action |
Args |
2017-04-05 02:38:53 | rtpg | set | recipients:
+ rtpg |
2017-04-05 02:38:53 | rtpg | set | messageid: <1491359933.76.0.94329407382.issue29989@psf.upfronthosting.co.za> |
2017-04-05 02:38:53 | rtpg | link | issue29989 messages |
2017-04-05 02:38:52 | rtpg | create | |
|