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 vstinner
Recipients Michał Bednarski, python-dev, vstinner
Date 2016-05-19.14:52:45
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1463669565.89.0.971098717822.issue27057@psf.upfronthosting.co.za>
In-reply-to
Content
> The ioctl is blocked for given file type regardless of request argument. As I'm running Python on non-rooted Android updating policy is not really an option.

Oh. Right :-) My intent was to suggest to report the SELinux issue upstream ;-)

> It will always fail for given file type (such as sockets), while it will work for others (such as regular files). I think that remembering that ioctl doesn't work may be okay, though I may be wrong. Either way if we are wrong whenever ioctl works we'll do one extra syscall.

The purpose of using ioctl() is to *reduce* the number of syscalls. If an application mostly use sockets, it will do 3 syscalls per socket (ioctl, fcntl get, fcntl set) instead of just 2 (fcntl get, fcntl set) :-/ So I like your patch ;-)

I applied your fix to Python 3.5 and 3.6. Thanks for your contribution.

You should now sign the PSF Contributor Agreement:
https://www.python.org/psf/contrib/contrib-form/

(Well, in fact it would be better to do that *before* merging your change, but well, your change is short enough ;-))
History
Date User Action Args
2016-05-19 14:52:45vstinnersetrecipients: + vstinner, python-dev, Michał Bednarski
2016-05-19 14:52:45vstinnersetmessageid: <1463669565.89.0.971098717822.issue27057@psf.upfronthosting.co.za>
2016-05-19 14:52:45vstinnerlinkissue27057 messages
2016-05-19 14:52:45vstinnercreate