diff options
| author | sebres <sebres@users.sourceforge.net> | 2019-06-24 10:17:20 (GMT) |
|---|---|---|
| committer | sebres <sebres@users.sourceforge.net> | 2019-06-24 10:17:20 (GMT) |
| commit | b747c97138d0c800251242baa9b4114153933154 (patch) | |
| tree | 7221a6cb41cd85e269998d41152db9ce3e4b26d3 | |
| parent | dcdfc7c2e5c2c3150210408ec2ef2e2d492ab1a7 (diff) | |
| parent | 2bdf8bd3055fc39f1eb7640ab31d275cbf4ad7cc (diff) | |
| download | tcl-b747c97138d0c800251242baa9b4114153933154.zip tcl-b747c97138d0c800251242baa9b4114153933154.tar.gz tcl-b747c97138d0c800251242baa9b4114153933154.tar.bz2 | |
merge 8.7
| -rw-r--r-- | generic/tclEvent.c | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/generic/tclEvent.c b/generic/tclEvent.c index d8d31d9..011cd9f 100644 --- a/generic/tclEvent.c +++ b/generic/tclEvent.c @@ -936,16 +936,20 @@ Tcl_Exit( currentAppExitPtr = appExitPtr; Tcl_MutexUnlock(&exitMutex); + /* + * Warning: this function SHOULD NOT return, as there is code that depends + * on Tcl_Exit never returning. In fact, we will Tcl_Panic if anyone + * returns, so critical is this dependcy. + * + * If subsystems are not (yet) initialized, proper Tcl-finalization is + * impossible, so fallback to system exit, see bug-[f8a33ce3db5d8cc2]. + */ + if (currentAppExitPtr) { - /* - * Warning: this code SHOULD NOT return, as there is code that depends - * on Tcl_Exit never returning. In fact, we will Tcl_Panic if anyone - * returns, so critical is this dependcy. - */ currentAppExitPtr(INT2PTR(status)); - Tcl_Panic("AppExitProc returned unexpectedly"); - } else { + + } else if (subsystemsInitialized) { if (TclFullFinalizationRequested()) { @@ -978,9 +982,10 @@ Tcl_Exit( FinalizeThread(/* quick */ 1); } - TclpExit(status); - Tcl_Panic("OS exit failed!"); } + + TclpExit(status); + Tcl_Panic("OS exit failed!"); } /* |
