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 martin.panter
Recipients benjamin.peterson, gregory.p.smith, martin.panter, serhiy.storchaka, vstinner
Date 2016-04-16.00:52:06
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1460767927.47.0.625012726838.issue26769@psf.upfronthosting.co.za>
In-reply-to
Content
It looks like some of these do make the file descriptor accessible to the Python user. The following are from the RST documentation:

oss_audio_device.fileno()
oss_mixer_device.fileno()
epoll.fileno()
kqueue.fileno()
audio device.fileno()

I did not find any documentation for the “linuxaudiodev” module, but it also seems to supply a public fileno() method:

$ sudo modprobe snd-pcm-oss
$ python2
Python 2.7.11 (default, Dec  6 2015, 15:43:46) 
[GCC 5.2.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import linuxaudiodev
>>> a = linuxaudiodev.open("w")
>>> a.fileno()
3

Unless there is demand for making these cases non-inheritable, it might be safest to leave them be. However it looks like the mmap file descriptor could be internal (though I’m not an expert on that module to be sure). So you might be okay with the mmap change.
History
Date User Action Args
2016-04-16 00:52:07martin.pantersetrecipients: + martin.panter, gregory.p.smith, vstinner, benjamin.peterson, serhiy.storchaka
2016-04-16 00:52:07martin.pantersetmessageid: <1460767927.47.0.625012726838.issue26769@psf.upfronthosting.co.za>
2016-04-16 00:52:07martin.panterlinkissue26769 messages
2016-04-16 00:52:06martin.pantercreate