Message265864
> 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 ;-)) |
|
Date |
User |
Action |
Args |
2016-05-19 14:52:45 | vstinner | set | recipients:
+ vstinner, python-dev, Michał Bednarski |
2016-05-19 14:52:45 | vstinner | set | messageid: <1463669565.89.0.971098717822.issue27057@psf.upfronthosting.co.za> |
2016-05-19 14:52:45 | vstinner | link | issue27057 messages |
2016-05-19 14:52:45 | vstinner | create | |
|