Overview
| Artifact ID: | 40e62e68586e37c00e6218979315a68fc03ec8c8 |
|---|---|
| Ticket: | 458490ffffffffffffffffffffffffffffffffff
Leaking Open File Handles |
| User & Date: | crokusek on 2001-09-04 19:08:47 |
Changes
- assignee changed to: "andreas_kupries"
- cmimetype changed to: "text/plain"
- comment changed to:
Hi All, I create an interpreter from "C" evaluate the following script: set F [open $rep_file w] puts invalid_file_ptr this_causes_an_error close $F Because an error occurs in the "puts" the "close $F" does not get called during script evaluation. Opening the file up with Wordpad gives the "File in use by another application." Note that win-emacs can open the file so it is a windows open exclusive type open that gives the error. After reporting the error, the "C" then code deletes the interpreter but still the file handle must be open because Wordpad still cannot open. I have also tried calling this directly before and after deleting the Interpreter: Tcl_DeleteAssocData(gpInterp, "tclIO"); But it has no effect either. :(. I have verified this bug to exist in 8.0 8.3 and 8.4 Can anyone provide workaround. Do I have to trap "open's" and "close's" myself? Note that replacing the illegal "puts" statement with a "return" actually has the same effect. Of course exiting the process closes the handle and wordpad is able to open the file. Thanks, Chris
- foundin changed to: "obsolete: 8.4a4"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "crokusek"
- subsystem changed to: "24. Channel Commands"
- title changed to: "Leaking Open File Handles"
- type changed to: "Bug"