Skip to content
Tcl Source Code History Of Ticket 458490ffffffffffffffffffffffffffffffffff
Login

History Of Ticket 458490ffffffffffffffffffffffffffffffffff

Artifacts Associated With Ticket 458490ffffffffffffffffffffffffffffffffff

  1. Ticket change [40e62e6858] (rid 116088) by crokusek on 2001-09-04 19:08:47:

    1. assignee initialized to: "andreas_kupries"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized 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 
      
      
      
    4. foundin initialized to: "obsolete: 8.4a4"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "crokusek"
    9. subsystem initialized to: "24. Channel Commands"
    10. title initialized to: "Leaking Open File Handles"
    11. type initialized to: "Bug"
  2. Ticket change [257a61e339] (rid 88181) by crokusek on 2001-09-05 04:17:31:

    1. icomment:
      Logged In: YES 
      user_id=315927
      
      The script should read:
      
      set F [open $rep_file w] 
      puts invalid_file_ptr this_causes_an_error 
      close $F 
      
      OR
      
      set F [open $rep_file w] 
      return
      close $F 
      
      
      
      
    2. login: "crokusek"
    3. mimetype: "text/plain"
    4. username: "crokusek"
  3. Ticket change [93e30ee944] (rid 105879) by hobbs on 2001-09-05 04:32:33:

    1. closedate changed to: "2001-09-04T21:32:33"
    2. closer changed to: "hobbs"
    3. icomment:
      Logged In: YES 
      user_id=72656
      
      You can't just init and delete the single interp (channels 
      can be moved between interps and threads).  You need to 
      make sure Tcl_Finalize is called (which in turn calls 
      TclFinalizeIOSubsystem which actually ensures all channels 
      are closed).
      
      
    4. login: "hobbs"
    5. mimetype: "text/plain"
    6. resolution changed to: "Invalid"
    7. status changed to: "Closed"
    8. username: "hobbs"