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 rtpg
Recipients rtpg
Date 2017-04-05.02:38:52
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1491359933.76.0.94329407382.issue29989@psf.upfronthosting.co.za>
In-reply-to
Content
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".
History
Date User Action Args
2017-04-05 02:38:53rtpgsetrecipients: + rtpg
2017-04-05 02:38:53rtpgsetmessageid: <1491359933.76.0.94329407382.issue29989@psf.upfronthosting.co.za>
2017-04-05 02:38:53rtpglinkissue29989 messages
2017-04-05 02:38:52rtpgcreate