summaryrefslogtreecommitdiffstats
path: root/win/tclWinPipe.c
diff options
context:
space:
mode:
authorpatthoyts <patthoyts@users.sourceforge.net>2005-11-04 23:01:39 (GMT)
committerpatthoyts <patthoyts@users.sourceforge.net>2005-11-04 23:01:39 (GMT)
commit2feffdc81ee352036ee1519395ff9e5dcab96867 (patch)
treead307b6f7f7d668f3002bfa09ea7896295955457 /win/tclWinPipe.c
parenta371489bc6ceddc40588b7fc34595e01989d633d (diff)
downloadtcl-2feffdc81ee352036ee1519395ff9e5dcab96867.zip
tcl-2feffdc81ee352036ee1519395ff9e5dcab96867.tar.gz
tcl-2feffdc81ee352036ee1519395ff9e5dcab96867.tar.bz2
* win/tclWinPort.h: Applied patch #1267871 by Matt Newman for
* win/tclWinPipe.c: extended error code support on Windows. * tests/exec.test: Tests for extended error codes. * generic/tclPipe.c: Permit long codes (platform macros permitting).
Diffstat (limited to 'win/tclWinPipe.c')
-rw-r--r--win/tclWinPipe.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/win/tclWinPipe.c b/win/tclWinPipe.c
index 93e9655..80eb3c0 100644
--- a/win/tclWinPipe.c
+++ b/win/tclWinPipe.c
@@ -9,7 +9,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclWinPipe.c,v 1.60 2005/11/04 00:06:50 dkf Exp $
+ * RCS: @(#) $Id: tclWinPipe.c,v 1.61 2005/11/04 23:01:40 patthoyts Exp $
*/
#include "tclWinInt.h"
@@ -2579,12 +2579,12 @@ Tcl_WaitPid(
case EXCEPTION_FLT_UNDERFLOW:
case EXCEPTION_INT_DIVIDE_BY_ZERO:
case EXCEPTION_INT_OVERFLOW:
- *statPtr = SIGFPE;
+ *statPtr = 0xC0000000 | SIGFPE;
break;
case EXCEPTION_PRIV_INSTRUCTION:
case EXCEPTION_ILLEGAL_INSTRUCTION:
- *statPtr = SIGILL;
+ *statPtr = 0xC0000000 | SIGILL;
break;
case EXCEPTION_ACCESS_VIOLATION:
@@ -2594,20 +2594,20 @@ Tcl_WaitPid(
case EXCEPTION_INVALID_DISPOSITION:
case EXCEPTION_GUARD_PAGE:
case EXCEPTION_INVALID_HANDLE:
- *statPtr = SIGSEGV;
+ *statPtr = 0xC0000000 | SIGSEGV;
break;
case EXCEPTION_DATATYPE_MISALIGNMENT:
- *statPtr = SIGBUS;
+ *statPtr = 0xC0000000 | SIGBUS;
break;
case EXCEPTION_BREAKPOINT:
case EXCEPTION_SINGLE_STEP:
- *statPtr = SIGTRAP;
+ *statPtr = 0xC0000000 | SIGTRAP;
break;
case CONTROL_C_EXIT:
- *statPtr = SIGINT;
+ *statPtr = 0xC0000000 | SIGINT;
break;
default:
@@ -2622,13 +2622,13 @@ Tcl_WaitPid(
* truncating it.
*/
- *statPtr = (((int)(short) exitCode << 8) & 0xffff00);
+ *statPtr = exitCode;
break;
}
result = pid;
} else {
errno = ECHILD;
- *statPtr = ECHILD;
+ *statPtr = 0xC0000000 | ECHILD;
result = (Tcl_Pid) -1;
}