Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2001-04-19
03:30 • Ticket [218940ffff] auto_execok 'start' is NT builtin status still... artifact: 0394a2f83f user: dgp
2000-10-26
08:32 • Closed ticket [218940ffff]. artifact: 76105dbc14 user: welch
01:08 • New ticket [218940ffff]. artifact: 63050f4946 user: nobody

[auto_execok] 'start' is NT builtin

Closed / Fixed218940ffffffffffffffffffffffffffffffffffCreated 26 years agoUpdated 26 years ago
Descriptionplain2000-10-26 01:08:16
OriginalBugID: 2858 Bug
Version: 8.2
SubmitDate: '1999-09-21'
LastModified: '2000-01-23'
Severity: MED
Status: Released
Submitter: techsupp
ChangedBy: hobbs
OS: Windows NT
Machine: X86
FixedDate: '2000-01-23'
FixedInVersion: 8.3
ClosedDate: '2000-10-25'


Name:

Don Porter



CVS:

$Id: init.tcl,v 1.33 1999/08/19 02:59:40 hobbs Exp $



Comments:

library(n) claims that [auto_execok] returns a non-empty list suitable

    for passing to [exec] when given the name of a shell builtin.  'start'

    is a shell builtin for Windows NT.

    

    Frequently on c.l.t. it is asked what is a portable way to invoke

    'start'

    on Windows 95/98/NT.  After applying this patch, the answer is:

    

    eval exec [auto_execok start] [list [file nativename $filename] &]

    

    The patch is structured so that it should be easy to add other shell

    builtins which are present on NT but not 95/98.



ReproducibleScript:

auto_execok start



ObservedBehavior:

Returns an empty string



DesiredBehavior:

% auto_execok start

    {C:\WINNT\system32\cmd.exe} /c start



Patch:

Index: init.tcl

===================================================================

RCS file: /cvsroot/tcl/library/init.tcl,v

retrieving revision 1.33

diff -c -r1.33 init.tcl

*** init.tcl    1999/08/19 02:59:40     1.33

--- init.tcl    1999/09/21 22:10:06

***************

*** 493,500 ****

      }

      set auto_execs($name) ""

  

!     if {[lsearch -exact {cls copy date del erase dir echo mkdir md rename 

!           ren rmdir rd time type ver vol} $name] != -1} {

        return [set auto_execs($name) [list $env(COMSPEC) /c $name]]

      }

  

--- 493,511 ----

      }

      set auto_execs($name) ""

  

!     switch $tcl_platform(os) {

!         "Windows NT" {

!             # NT has different shell built-ins, notably 'start'

!             set shellBuiltins [list cls copy date del erase dir echo mkdir \

!                     md rename ren rmdir rd start time type ver vol]

!         }

!         default {

!             set shellBuiltins [list cls copy date del erase dir echo mkdir \

!                     md rename ren rmdir rd time type ver vol]

!         }

!     }

! 

!     if {[lsearch -exact $shellBuiltins $name] != -1} {

        return [set auto_execs($name) [list $env(COMSPEC) /c $name]]

      }



PatchFiles:

library/init.tcl





Changed for 8.3.0 where NT adds "start" to list. 
-- 01/23/2000 hobbs
welch Closed ticket [218940ffff]. [History diff]2000-10-26 08:32:14
dgp Ticket [218940ffff]: 3 changes [History diff]2001-04-19 03:30:10
Log in (anonymous is fine) to add a comment.