Skip to content
Tcl Source Code Check-in [81bac01dd8]
Login

Check-in [81bac01dd8]

Overview
Comment:Fix [91c9bc1c45]: on Windows, [open] failed with an empty error message after dup2() replaced a standard handle behind Tcl's back (e.g. pytest --capture=fd). The new handle from CreateFile() got the value of the closed standard handle, and OpenFileChannel() found the stale std channel by that value; the handle also leaked. Only Tcl_MakeFileChannel() now looks for an existing channel with the same handle. Add [testdup2] and a test.
Timelines: family | ancestors | descendants | both | win-open-stale-handle
Files: files | file ages | folders
SHA3-256: 81bac01dd8719d8047d111b4d77f74cdd7e5b6f045385f91555b8dc9e02bd234
User & Date: serhiy.storchaka on 2026-11-12 20:22:51.739
Other Links: branch diff | manifest | tags
Context
2026-11-20
17:01
Fix [91c9bc]: Windows: "open" failed with an empty error message after dup2() check-in: 9f712d171c user: jan.nijtmans tags: trunk, main
2026-11-12
20:22
Fix [91c9bc1c45]: on Windows, [open] failed with an empty error message after dup2() replaced a stan... closed check-in: 81bac01dd8 user: serhiy.storchaka tags: win-open-stale-handle
2026-11-11
14:35
Fix [1523045fff] and [731062ffff]: [file copy] to a filesystem that cannot store the mode or the tim... check-in: 6e7c8299c5 user: jan.nijtmans tags: trunk, main
Changes