From ec5d3cd533be223248a77a881f584e64f4777646 Mon Sep 17 00:00:00 2001 From: Xavier de Gaye Date: Sat, 19 Nov 2016 16:19:29 +0100 Subject: Issue #28746: Fix the set_inheritable() file descriptor method on platforms that do not have the ioctl FIOCLEX and FIONCLEX commands --- Python/fileutils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Python/fileutils.c') 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); -- cgit v1.2.1