Author rtpg
Recipients rtpg
Date 2017-04-05.02:38:52
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
From the documentation of the io module:

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:53rtpgsetrecipients: + rtpg
2017-04-05 02:38:53rtpgsetmessageid: <>
2017-04-05 02:38:53rtpglinkissue29989 messages
2017-04-05 02:38:52rtpgcreate