]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-30555: Fix WindowsConsoleIO fails in the presence of fd redirection (GH-1927)
authorSegev Finer <segev208@gmail.com>
Fri, 23 Apr 2021 22:00:27 +0000 (01:00 +0300)
committerGitHub <noreply@github.com>
Fri, 23 Apr 2021 22:00:27 +0000 (23:00 +0100)
commit5e437fb872279960992c9a07f1a4c051b4948c53
treeda3e3ad584eba24da9cfe63c4acd1a01e55d4676
parent6b59e662fa39a356d6eb03d349b140477857f4b1
bpo-30555: Fix WindowsConsoleIO fails in the presence of fd redirection (GH-1927)

This works by not caching the handle and instead getting the handle from
the file descriptor each time, so that if the actual handle changes by
fd redirection closing/opening the console handle beneath our feet, we
will keep working correctly.
Include/cpython/fileutils.h
Misc/NEWS.d/next/Windows/2017-12-16-12-23-51.bpo-30555.3ybjly.rst [new file with mode: 0644]
Modules/_io/clinic/winconsoleio.c.h
Modules/_io/winconsoleio.c
Modules/mmapmodule.c
Modules/posixmodule.c
PC/_testconsole.c
PC/msvcrtmodule.c
Parser/myreadline.c
Python/fileutils.c