Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 89838fe67e80707c7537ed8c344a8c62c9ef25cd
Ticket: 217811ffffffffffffffffffffffffffffffffff
exec does not work from script processed by the Tcl Interpre
User & Date: nobody on 2000-10-26 00:43:59
Changes

  1. assignee changed to: "nobody"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    OriginalBugID: 1312 Bug
    Version: 8.0p2
    SubmitDate: '1999-02-26'
    LastModified: '1999-09-20'
    Severity: CRIT
    Status: Closed
    Submitter: welch
    ChangedBy: hobbs
    RelatedBugIDs: 1342 942
    OS: Other
    OSVersion: SCO Unixware 7.0.1
    Machine: NA
    FixedDate: '2000-10-25'
    ClosedDate: '1999-09-20'
    
    
    Name:
    
    Bill Snapper
    
    
    
    CustomShell:
    
    see patch above
    
    
    
    ReproducibleScript:
    
    My application uses Tcl for the configuration language as well as for
    
    policy scripting.  The application links in the Tcl interpreter and adds
    
    some configuration commands.
    
    
    
    The application is multi-threaded though Tcl is not expected to
    
    be multi-threaded.  Tcl is only invoked on a single thread.
    
    
    
    If an "exec" command is in the configuration script it will
    
    fail regardless of what is trying to be exec'd.  I traced this
    
    to tclUnixPipe.c, the function "TclpCreateProcess".  This function
    
    uses "vfork".  On SCO (I'm using Unixware 7.0.1) the function
    
    "vfork" will not work if there is more than one LWP in the
    
    current process.
    
    
    
    I have built my own interpreter using "fork" instead of "vfork"
    
    and this worked.  FYI, the problem is in the latest beta of
    
    Tcl that's supposed to be thread-safe as well.
    
    
    
    
    
    
    
    
    
    ObservedBehavior:
    
    exec does not work...
    
    
    
    
    
    
    
    
    
    DesiredBehavior:
    
    exec would work... ;-)
    
    
    
    
    
    
    
    
    
    Patch:
    
    *** tclUnixPipe.c.origWed Nov  5 16:58:52 1997
    
    --- tclUnixPipe.cSun Feb 21 22:19:36 1999
    
    ***************
    
    *** 355,361 ****
    
    --- 355,365 ----
    
          }
    
      
    
          joinThisError = (errorFile == outputFile);
    
    + #if 0
    
          pid = vfork();
    
    + #else
    
    +     pid = fork();
    
    + #endif
    
          if (pid == 0) {
    
      fd = GetFd(errPipeOut);
    
      
    
    
    
    
    
    
    
    
    
    PatchFiles:
    
    tclUnixPipe.c
    
    
    
    
    
    
    
    
    
    
    
  4. foundin changed to: "obsolete: 8.0p2"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "nobody"
  9. subsystem changed to: "69. Other"
  10. title changed to:
    exec does not work from script processed by the Tcl Interpre
    
  11. type changed to: "Bug"