summaryrefslogtreecommitdiffstats
path: root/win/tclWinPort.h
diff options
context:
space:
mode:
authordavygrvy <davygrvy@pobox.com>2004-05-30 21:57:09 (GMT)
committerdavygrvy <davygrvy@pobox.com>2004-05-30 21:57:09 (GMT)
commit0c988adc2fbfe2e8803d169aaf90abccf11842a7 (patch)
treea2df1f8140446d183449bc1cb1eee15f19cce927 /win/tclWinPort.h
parent6c850f4e8fd30d0c0826b5e9af5b627b36bff7b2 (diff)
downloadtcl-0c988adc2fbfe2e8803d169aaf90abccf11842a7.zip
tcl-0c988adc2fbfe2e8803d169aaf90abccf11842a7.tar.gz
tcl-0c988adc2fbfe2e8803d169aaf90abccf11842a7.tar.bz2
* win/tclWinPipe.c:
* win/tclWinPort.h: Reworked the win implementation of Tcl_WaitPid to support exitcodes in the 'signed short' range. Even though this range is non-portable, it is valid on windows. Detection of exception codes are now more accurate. Previously, an application that exited with ExitProcess((DWORD)-1); was improperly reported as exiting with SIGABRT.
Diffstat (limited to 'win/tclWinPort.h')
-rw-r--r--win/tclWinPort.h16
1 files changed, 14 insertions, 2 deletions
diff --git a/win/tclWinPort.h b/win/tclWinPort.h
index 3e6364e..73de9a5 100644
--- a/win/tclWinPort.h
+++ b/win/tclWinPort.h
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclWinPort.h,v 1.40 2004/04/06 22:25:58 dgp Exp $
+ * RCS: @(#) $Id: tclWinPort.h,v 1.41 2004/05/30 21:57:09 davygrvy Exp $
*/
#ifndef _TCLWINPORT
@@ -215,6 +215,18 @@
#endif /* !EOVERFLOW */
/*
+ * Signals not known to the standard ANSI signal.h. These are used
+ * by Tcl_WaitPid() and generic/tclPosixStr.c
+ */
+
+#ifndef SIGTRAP
+# define SIGTRAP 5
+#endif
+#ifndef SIGBUS
+# define SIGBUS 10
+#endif
+
+/*
* Supply definitions for macros to query wait status, if not already
* defined in header files above.
*/
@@ -230,7 +242,7 @@
#endif
#ifndef WEXITSTATUS
-# define WEXITSTATUS(stat) (((*((int *) &(stat))) >> 8) & 0xff)
+# define WEXITSTATUS(stat) (short)(((*((int *) &(stat))) >> 8) & 0xffff)
#endif
#ifndef WIFSIGNALED