Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: b5689326a8cb534ead1e1c29706757cd022f7050
Ticket: 218167ffffffffffffffffffffffffffffffffff
exec fails if external program outputs on stderr.
User & Date: nobody on 2000-10-26 00:54:03
Changes

  1. assignee changed to: "nobody"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    OriginalBugID: 2252 Bug
    Version: 8.0.4
    SubmitDate: '1999-06-16'
    LastModified: '1999-12-03'
    Severity: SER
    Status: Closed
    Submitter: techsupp
    ChangedBy: hobbs
    OS: HP-UX
    OSVersion: B.10.20 A 9000/782 2007715559
    Machine: Other
    FixedDate: '2000-10-25'
    ClosedDate: '1999-12-03'
    
    
    Name: Thomas Joergensen
    
    ReproducibleScript:
    $ cat booh
        #! /bin/ksh
        print "Hello World."
        print -u2 "Booh!"
        $ cat catchbooh
        #! /usr/local/bin/tclsh
        puts [catch {exec ./booh} out]
        $ ./catchbooh
        1
        Booh!
        $
    
    ObservedBehavior:
    exec fails if the external program writes anything to stderr.  This is
        not
        a wrong behavior of a program and should not in itself not throw an
        exeption.
        
        The Korn shell script exits normally with an exitcode of zero.  If it
        prints
        to stdout (print "...") instead, it does not make exec throw an
        exeption.
        
        I take this to be a bug, since it is not described in either the
        exec(3t) man
        page nor in the "Tcl and the TK Toolkit" by John K. Ousterhout
    
    DesiredBehavior:
    An external program terminating with an exitcode of zero should not make
        exec throw an exeption.
    
    
    
    In the docs for exec for Tcl, it states:
    
    If any of the commands writes to its standard error file and that standard error isn't redirected, then exec will return an error;  the error message will include the pipeline's standard output, followed by messages about abnormal terminations (if any), followed by the standard error output.  
    -- 12/03/1999 hobbs
    
    
    
  4. foundin changed to: "obsolete: 8.0.4"
  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: "60. NRE and coroutines"
  10. title changed to: "exec fails if external program outputs on stderr."
  11. type changed to: "Bug"