Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: f4850fdf58b3a1d06c55fcd9da92776f5b2ecac5
Ticket: 558742ffffffffffffffffffffffffffffffffff
tcltest creates 'tmp' in current dir
User & Date: vincentdarley on 2002-05-21 15:56:48
Changes

  1. assignee changed to: "dkf"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    The tcltest package tries to create a file 'tmp' in 
    the pwd.  This is particularly problematic when 'pwd' 
    is inside a vfs (which can easily happen since tcltest 
    is actually a part of default tclkit executables).
    
    Furthermore, under some circumstances, even if 
    the 'tmp' file is created, it is not cleaned up.
    
    The problematic code is around line 1179 of 
    tcltest.tcl:
    
        testConstraint stdio 0
        catch {
    catch {file delete -force tmp}
    set f [open tmp w]
    puts $f {
        exit
    }
    close $f
    
    set f [open "|[list [interpreter] tmp]" r]
    close $f
    
    testConstraint stdio 1
        }
        catch {file delete -force tmp}
    
    Problems observed are:
    
    (i) assumption that 'tmp' is in the native filesystem 
    and therefore that 'open |' will work.
    (ii) assumption that 'puts $f ...' will not fail -- if 
    it does, then '$f' is never closed.
    
    It would be best if 'tmp' was put in $env(TEMP), ...
    
    
    
  4. foundin changed to: "None"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "vincentdarley"
  9. subsystem changed to: "34. tcltest Package"
  10. title changed to: "tcltest creates 'tmp' in current dir"
  11. type changed to: "Bug"