Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 7904c6a78ae0a62fcf162ac3776a4574d3da0399
Ticket: 4ab2ccc4a26e39e630ab96f7e9281b60181ea5e9
auto_exec and exec inconsistent in Windows
User & Date: gerhardr on 2014-12-02 12:24:11
Changes

  1. assignee changed to: "nobody"
  2. closer changed to: "nobody"
  3. cmimetype changed to: "text/plain"
  4. comment changed to:
    #
    # Inconsistency between execution (exec) and exec_ok result
    # Incorrect exec_ok result for CMD files (prob. also other executables)
    # Incorrect error message: no such file or directory on exec
    # 
    catch {console show}
    
    puts "Tcl/Tk [info patchlevel] - TCL bug exec/exec_ok"
    
    foreach ext {BAT CMD TXT} {
      set exepath [file join $env(TEMP) ${ext}_Test]
      puts "\nexepath=$exepath"
    
      set cmdfile $exepath.$ext
      if {! [file exists $cmdfile]} {
        puts "File doesn't exists, creating $cmdfile ..."
        set fd [open $cmdfile {WRONLY TRUNC CREAT}]
        puts $fd "@echo %~dpn0 started successfully... "
        close $fd
      }
    
      set execok [auto_execok $exepath]
      set fileex [file exists $execok]
      puts "execok=$execok, file exists=$fileex"
    
      catch {unset tmp}
      set oserrorcode [catch { set tmp [exec  $execok] } oserrormsg]
      if {[info exists tmp]} {
        puts "cmdfile executed: oserrorcode=$oserrorcode, tmp='$tmp'"
      } else {
        puts "cmdfile executed: oserrorcode=$oserrorcode, tmp not set"
      }
    
      if {[info exists oserrormsg]} {
        puts "oserrormsg='$oserrormsg'"
      }
    }
    
  5. foundin changed to: "8.6, 8.5"
  6. is_private changed to: "0"
  7. login: "gerhardr"
  8. priority changed to: "5 Medium"
  9. private_contact changed to: "9b076687903aba8f5254d84cbc9577f25d0fbe8c"
  10. resolution changed to: "None"
  11. severity changed to: "Important"
  12. status changed to: "Open"
  13. submitter changed to: "gerhardr"
  14. subsystem changed to: "- New Builtin Commands"
  15. title changed to: "auto_exec and exec inconsistent in Windows"
  16. type changed to: "Bug"