Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 14a5d8e55fff3d8347d48cd91ca1b97d36fc527a
Ticket: 218395ffffffffffffffffffffffffffffffffff
precision of errorCode CHILDSTATUS pid returnCode
User & Date: nobody on 2000-10-26 00:57:04
Changes

  1. assignee changed to: "nobody"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    OriginalBugID: 5172 Bug
    Version: 8.3
    SubmitDate: '2000-04-19'
    LastModified: '2000-04-20'
    Severity: SER
    Status: Closed
    Submitter: techsupp
    ChangedBy: ericm
    OS: Windows NT
    OSVersion: 4.0
    Machine: Dell Optiplex GX1
    FixedDate: '2000-10-25'
    ClosedDate: '2000-04-20'
    
    
    Name:
    Christophe De Clercq
    
    ReproducibleScript:
    1) create any program that returns a value greather than 127 (7 bits)
    2) on tcl prompt type: 
    set myVar [catch {exec anyProg} myResult]
    puts stdout $errorCode
    
    ObservedBehavior:
    if "anyProg.exe" returns the integer value of "200006"
    the value of "errorCode" becomes => "CHILDSTATUS -1 70"
    
    Possible explanation:
    200006 is binary: 110000110101000110
        70 is binary:            1000110
    
    It would mean that the precision is only 7 bit (unsigned integer?)
    It tried to set the variable tcl_precision but this has no impact.
    
    DesiredBehavior:
    I expect the value of "errorCode" to be => "CHILDSTATUS -1 200006"
    
    We use a lot of C programs that return "long integers" this would mean
    a lot of recoding if only 7 bits are interpreted by TCL.
    
    
    
    According to the MSDN:
    
        void exit ( int status );
        void _exit ( int status );
    
        ...
    
        Although the exit and _exit calls do not return a value, the
        low-order byte of status is made available to the waiting calling
        process, if one exists ...
    
    This indicates that, as on UNIX, the return value from a program is
    limited to the low-order 8 bytes of the value you give to exit.  This is
    not a Tcl limitation.
    
    - eric
     
    -- 04/20/2000 ericm
    
  4. foundin changed to: "obsolete: 8.3"
  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: "precision of errorCode CHILDSTATUS pid returnCode"
  11. type changed to: "Bug"