Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2001-04-13
23:09 • Ticket [217811ffff] exec does not work from script processed by the Tcl Interpre... artifact: 1af4b219d3 user: dgp
2000-10-26
07:49 • Closed ticket [217811ffff]. artifact: 467dd9e704 user: welch
00:43 • New ticket [217811ffff]. artifact: 89838fe67e user: nobody

exec does not work from script processed by the Tcl Interpre

Closed / Duplicate217811ffffffffffffffffffffffffffffffffffCreated 26 years agoUpdated 26 years ago
Descriptionplain2000-10-26 00:43:59
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
welch Closed ticket [217811ffff]. [History diff]2000-10-26 07:49:19
dgp Ticket [217811ffff]: 3 changes [History diff]2001-04-13 23:09:40
Log in (anonymous is fine) to add a comment.