Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
4a3443be
Commit
4a3443be
authored
May 19, 2016
by
Victor Stinner
Browse files
Options
Browse Files
Download
Plain Diff
Merge 3.5 (issue #27057)
parents
99ab0068
3116cc44
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
2 deletions
+12
-2
Misc/ACKS
Misc/ACKS
+1
-0
Misc/NEWS
Misc/NEWS
+4
-0
Python/fileutils.c
Python/fileutils.c
+7
-2
No files found.
Misc/ACKS
View file @
4a3443be
...
...
@@ -110,6 +110,7 @@ Neal Becker
Robin Becker
Torsten Becker
Bill Bedford
Michał Bednarski
Ian Beer
Stefan Behnel
Reimer Behrends
...
...
Misc/NEWS
View file @
4a3443be
...
...
@@ -297,6 +297,10 @@ Core and Builtins
Library
-------
- Issue #27057: Fix os.set_inheritable() on Android, ioctl() is blocked by
SELinux and fails with EACCESS. The function now falls back to fcntl().
Patch written by Michał Bednarski.
- Issue #27014: Fix infinite recursion using typing.py. Thanks to Kalle Tuure!
- Issue #27031: Removed dummy methods in Tkinter widget classes: tk_menuBar()
...
...
Python/fileutils.c
View file @
4a3443be
...
...
@@ -860,7 +860,7 @@ set_inheritable(int fd, int inheritable, int raise, int *atomic_flag_works)
return
0
;
}
if
(
errno
!=
ENOTTY
)
{
if
(
errno
!=
ENOTTY
&&
errno
!=
EACCES
)
{
if
(
raise
)
PyErr_SetFromErrno
(
PyExc_OSError
);
return
-
1
;
...
...
@@ -869,7 +869,12 @@ set_inheritable(int fd, int inheritable, int raise, int *atomic_flag_works)
/* Issue #22258: Here, ENOTTY means "Inappropriate ioctl for
device". The ioctl is declared but not supported by the kernel.
Remember that ioctl() doesn't work. It is the case on
Illumos-based OS for example. */
Illumos-based OS for example.
Issue #27057: When SELinux policy disallows ioctl it will fail
with EACCES. While FIOCLEX is safe operation it may be
unavailable because ioctl was denied altogether.
This can be the case on Android. */
ioctl_works
=
0
;
}
/* fallback to fcntl() if ioctl() does not work */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment