summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordavygrvy <davygrvy@pobox.com>2002-12-05 00:15:01 (GMT)
committerdavygrvy <davygrvy@pobox.com>2002-12-05 00:15:01 (GMT)
commit09df1bc509dd5e99187dfac5795e2e13fef53df5 (patch)
tree273d16d662b0afdaf6ae19100c95440e09ccd35b
parent7e2fb9e70cbf48d9ab770d3a64d35e3aa745bb21 (diff)
downloadtcl-09df1bc509dd5e99187dfac5795e2e13fef53df5.zip
tcl-09df1bc509dd5e99187dfac5795e2e13fef53df5.tar.gz
tcl-09df1bc509dd5e99187dfac5795e2e13fef53df5.tar.bz2
* win/tclWinPipe.c: reverted back to -r1.27 due to numerous test
failures that need to be resolved first.
-rw-r--r--ChangeLog6
-rw-r--r--win/tclWinPipe.c74
2 files changed, 13 insertions, 67 deletions
diff --git a/ChangeLog b/ChangeLog
index 7992162..ca3f7d9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
2002-12-04 David Gravereaux <davygrvy@pobox.com>
+ * win/tclWinPipe.c: reverted back to -r1.27 due to numerous test
+ failures that need to be resolved first. The idea was good,
+ but the details aren't.
+
+2002-12-04 David Gravereaux <davygrvy@pobox.com>
+
* win/tclWinPipe.c (Tcl_WaitPid): When a process exits with an
exception, pass this notice on to the caller with a SIG* code
rather than truncating the exit code and missing the meaning.
diff --git a/win/tclWinPipe.c b/win/tclWinPipe.c
index acb7ca6..64ecf6d 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.30 2002/12/04 22:05:18 davygrvy Exp $
+ * RCS: @(#) $Id: tclWinPipe.c,v 1.31 2002/12/05 00:15:01 davygrvy Exp $
*/
#include "tclWinInt.h"
@@ -1143,7 +1143,7 @@ TclpCreateProcess(
if (TclWinGetPlatformId() == VER_PLATFORM_WIN32_NT) {
if (HasConsole()) {
- createFlags = CREATE_NEW_PROCESS_GROUP;
+ createFlags = 0;
} else if (applType == APPL_DOS) {
/*
* Under NT, 16-bit DOS applications will not run unless they
@@ -1162,7 +1162,7 @@ TclpCreateProcess(
}
} else {
if (HasConsole()) {
- createFlags = CREATE_NEW_PROCESS_GROUP;
+ createFlags = 0;
} else {
createFlags = DETACHED_PROCESS;
}
@@ -1852,19 +1852,6 @@ PipeClose2Proc(
errorCode = 0;
if ((!flags || (flags == TCL_CLOSE_READ))
&& (pipePtr->readFile != NULL)) {
-
- /*
- * Send the console group a notification of close. We assume
- * the child is a console application, and that it will respond.
- * It doesn't seem as though console mode applications that
- * don't set a HandlerRoutine acknowledge this.
- */
-
- if (HasConsole() && pipePtr->numPids) {
- GenerateConsoleCtrlEvent(CTRL_BREAK_EVENT,
- TclpGetPid(pipePtr->pidPtr[0]));
- }
-
/*
* Clean up the background thread if necessary. Note that this
* must be done before we can close the file, since the
@@ -2465,7 +2452,7 @@ Tcl_WaitPid(
ProcInfo *infoPtr, **prevPtrPtr;
DWORD flags;
Tcl_Pid result;
- DWORD ret, exitCode;
+ DWORD ret;
PipeInit();
@@ -2520,56 +2507,9 @@ Tcl_WaitPid(
} else {
result = 0;
}
- } else if (ret == WAIT_OBJECT_0) {
- GetExitCodeProcess(infoPtr->hProcess, &exitCode);
- if (exitCode & 0xC0000000) {
- /*
- * A fatal exception occured.
- */
- switch (exitCode) {
- case EXCEPTION_FLT_DENORMAL_OPERAND:
- case EXCEPTION_FLT_DIVIDE_BY_ZERO:
- case EXCEPTION_FLT_INEXACT_RESULT:
- case EXCEPTION_FLT_INVALID_OPERATION:
- case EXCEPTION_FLT_OVERFLOW:
- case EXCEPTION_FLT_STACK_CHECK:
- case EXCEPTION_FLT_UNDERFLOW:
- case EXCEPTION_INT_DIVIDE_BY_ZERO:
- case EXCEPTION_INT_OVERFLOW:
- *statPtr = SIGFPE;
- break;
-
- case EXCEPTION_PRIV_INSTRUCTION:
- case EXCEPTION_ILLEGAL_INSTRUCTION:
- case EXCEPTION_INVALID_HANDLE:
- *statPtr = SIGILL;
- break;
-
- case EXCEPTION_ACCESS_VIOLATION:
- case EXCEPTION_DATATYPE_MISALIGNMENT:
- case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
- case EXCEPTION_STACK_OVERFLOW:
- case EXCEPTION_NONCONTINUABLE_EXCEPTION:
- case EXCEPTION_INVALID_DISPOSITION:
- case EXCEPTION_GUARD_PAGE:
- *statPtr = SIGSEGV;
- break;
-
- case CONTROL_C_EXIT:
- *statPtr = SIGINT;
- break;
-
- default:
- *statPtr = SIGABRT;
- break;
- }
- } else {
- /*
- * Non exception, normal, exit code. Note that the exit code
- * is truncated to a byte range.
- */
- *statPtr = ((exitCode << 8) & 0xff00);
- }
+ } else if (ret != WAIT_FAILED) {
+ GetExitCodeProcess(infoPtr->hProcess, (DWORD*)statPtr);
+ *statPtr = ((*statPtr << 8) & 0xff00);
result = pid;
} else {
errno = ECHILD;