Overview
| Artifact ID: | ebed174ca5e536d16a39d49022204e82109898bd |
|---|---|
| Ticket: | 772288ffffffffffffffffffffffffffffffffff
Crash when std channels not open |
| User & Date: | dkf on 2003-07-16 13:18:15 |
Changes
- assignee changed to: "andreas_kupries"
- cmimetype changed to: "text/plain"
- comment changed to:
The following script crashes both the HEAD and the 8.4 branch: open /dev/null when run like this (from BASH, but there are other equivalent situations): tclsh bug.tcl <&- The effect of the invokation is to make tclsh run without stdin opened (the same also happens with stdout and stderr.) This is caused by leaving the initialisation of the channel table until the call to Tcl_RegisterChannel() as part of the closing stages of the [open] implementation, which ensures that fd0 (or 1 or 2) is put in the table twice, once for stdin/out/err and once for the newly created channel for [open], with the second time being the crash. The attached patch fixes this, but causes test encoding-24.3 to fail, and will break any script that depends on setting [encoding system] early so as to alter the encodings of the std channels. This problem was discovered by rmax
- foundin changed to: "obsolete: 8.4.3"
- priority changed to: "9 Immediate"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "dkf"
- subsystem changed to: "25. Channel System"
- title changed to: "Crash when std channels not open"
- type changed to: "Bug"