summaryrefslogtreecommitdiffstats
path: root/generic/tclTest.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2018-06-25 20:39:31 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2018-06-25 20:39:31 (GMT)
commit3c26b9439d5c9a10bfac52bd5e96024b475e79fd (patch)
tree934c4fd78ce15f57b6ec976b70ce60caf450a63d /generic/tclTest.c
parent6264f4978838b089748579e436d35b30a4e56201 (diff)
parentfdee46ab16b879589155729e6db4fdabe235880f (diff)
downloadtcl-3c26b9439d5c9a10bfac52bd5e96024b475e79fd.zip
tcl-3c26b9439d5c9a10bfac52bd5e96024b475e79fd.tar.gz
tcl-3c26b9439d5c9a10bfac52bd5e96024b475e79fd.tar.bz2
merge 8.7
Diffstat (limited to 'generic/tclTest.c')
-rw-r--r--generic/tclTest.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/generic/tclTest.c b/generic/tclTest.c
index b6d6b95..115fbcc 100644
--- a/generic/tclTest.c
+++ b/generic/tclTest.c
@@ -44,6 +44,7 @@
DLLEXPORT int Tcltest_Init(Tcl_Interp *interp);
DLLEXPORT int Tcltest_SafeInit(Tcl_Interp *interp);
+EXTERN TCL_NORETURN void Tcltest_Exit(ClientData clientData);
/*
* Dynamic string shared by TestdcallCmd and DelCallbackProc; used to collect
@@ -570,6 +571,10 @@ Tcltest_Init(
return TCL_ERROR;
}
+
+ /* Finalizer */
+ Tcl_SetExitProc(Tcltest_Exit);
+
/*
* Create additional commands and math functions for testing Tcl.
*/
@@ -797,6 +802,17 @@ Tcltest_SafeInit(
return Procbodytest_SafeInit(interp);
}
+TCL_NORETURN void Tcltest_Exit(
+ ClientData clientData
+) {
+ int status = PTR2INT(clientData);
+ Tcl_Finalize();
+ TclThreadTestFinalize();
+ TclpExit(status);
+ Tcl_Panic("OS exit failed!");
+}
+
+
/*
*----------------------------------------------------------------------
*