Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: a07b4f51cd17429dbaed8077086f16654892512a
Ticket: 616527ffffffffffffffffffffffffffffffffff
Errorlevel on Win32 with EXEC
User & Date: davygrvy on 2002-12-08 22:48:27
Changes

  1. icomment:
    Logged In: YES 
    user_id=7549
    
    From Tcl_WaitPid() in win/tclWinPipe.c:
    
        *statPtr = ((exitCode << 8) & 0xff00);
    
    all we get is a byte range.  Yes, it looks odd by shifting left 
    and truncating, but this is for the WEXITSTATUS() macro 
    back in TclCleanupChildren() in generic/tclPipe.c
    
    I have some additional code i'm playing with to enable 
    Tcl_WaitPid() to return exit exception codes.  It looks like 
    this, but isn't ready for a commit just yet:
    
    if (exitCode & 0xC0000000) {
        /*
         * A fatal exception occured.
         */
        switch (exitCode) {
    case EXCEPTION_INT_OVERFLOW:
        *statPtr = SIGFPE;
        break;
    ....
        }
    } else {
        /*
         * Non exception, normal, exit code.  Note that 
    the exit code
         * is truncated to a byte range.
         */
        *statPtr = ((exitCode << 8) & 0xff00);
    }
    
    
    
  2. login: "davygrvy"
  3. mimetype: "text/plain"
  4. username: "davygrvy"