From: Xavier de Gaye Date: Sat, 19 Nov 2016 15:19:29 +0000 (+0100) Subject: Issue #28746: Fix the set_inheritable() file descriptor method on platforms X-Git-Tag: v3.6.0b4~54 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ec5d3cd533be223248a77a881f584e64f4777646;p=python Issue #28746: Fix the set_inheritable() file descriptor method on platforms that do not have the ioctl FIOCLEX and FIONCLEX commands --- diff --git a/Misc/NEWS b/Misc/NEWS index 558366f4a6..afee56ae48 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -10,6 +10,9 @@ What's New in Python 3.6.0 beta 4 Core and Builtins ----------------- +- Issue #28746: Fix the set_inheritable() file descriptor method on platforms + that do not have the ioctl FIOCLEX and FIONCLEX commands. + - Issue #26920: Fix not getting the locale's charset upon initializing the interpreter, on platforms that do not have langinfo. diff --git a/Python/fileutils.c b/Python/fileutils.c index e3bfb0c502..6a32c42c80 100644 --- a/Python/fileutils.c +++ b/Python/fileutils.c @@ -886,7 +886,7 @@ set_inheritable(int fd, int inheritable, int raise, int *atomic_flag_works) return 0; } - res = fcntl(fd, F_SETFD, flags); + res = fcntl(fd, F_SETFD, new_flags); if (res < 0) { if (raise) PyErr_SetFromErrno(PyExc_OSError);