Tcl Source Code

Check-in [d66ef00ecb]
Login
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2019 Conference, Houston/TX, US, Nov 4-8
Send your abstracts to [email protected]
or submit via the online form by Sep 9.

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:merge 8.7
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: d66ef00ecbbb810064e5e0abe7032ff2c5ae40b711447d5a9d5336f7109ae897
User & Date: sebres 2019-06-24 10:17:20
Context
2019-06-24
10:31
amend to [f3d49044c4e658a7]: resolve warnings (signed/unsigned comparisons, if compiled with MSVC) check-in: 05976f03c4 user: sebres tags: trunk
10:17
merge 8.7 check-in: d66ef00ecb user: sebres tags: trunk
08:56
merge 8.6 check-in: 2e6718f988 user: sebres tags: core-8-branch
07:35
Merge 8.7. Also eliminate some spacing before line-endings check-in: 519bf88d4c user: jan.nijtmans tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to generic/tclEvent.c.

931
932
933
934
935
936
937
938
939
940
941
942
943



944
945


946
947
948


949
950
951
952
953
954
955
...
974
975
976
977
978
979
980


981
982
983
984
985
986
987
988
989
990
				 * for normal return, 1 for error return. */
{
    TCL_NORETURN1 Tcl_ExitProc *currentAppExitPtr;

    Tcl_MutexLock(&exitMutex);
    currentAppExitPtr = appExitPtr;
    Tcl_MutexUnlock(&exitMutex);

    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 {



	if (TclFullFinalizationRequested()) {

	    /*
	     * Thorough finalization for Valgrind et al.
	     */

................................................................................
	     * Now finalize the calling thread only (others are not safely
	     * reachable).  Among other things, this triggers a flush of the
	     * Tcl_Channels that may have data enqueued.
	     */

	    FinalizeThread(/* quick */ 1);
	}


	TclpExit(status);
	Tcl_Panic("OS exit failed!");
    }
}
 
/*
 *-------------------------------------------------------------------------
 *
 * TclInitSubsystems --
 *







<
|
|
|
|
>
>
>
|

>
>

<
<
>
>







 







>
>
|
|
<







931
932
933
934
935
936
937
938

939
940
941
942
943
944
945
946
947
948
949
950


951
952
953
954
955
956
957
958
959
...
978
979
980
981
982
983
984
985
986
987
988

989
990
991
992
993
994
995
				 * for normal return, 1 for error return. */
{
    TCL_NORETURN1 Tcl_ExitProc *currentAppExitPtr;

    Tcl_MutexLock(&exitMutex);
    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) {

	currentAppExitPtr(INT2PTR(status));



    } else if (subsystemsInitialized) {

	if (TclFullFinalizationRequested()) {

	    /*
	     * Thorough finalization for Valgrind et al.
	     */

................................................................................
	     * Now finalize the calling thread only (others are not safely
	     * reachable).  Among other things, this triggers a flush of the
	     * Tcl_Channels that may have data enqueued.
	     */

	    FinalizeThread(/* quick */ 1);
	}
    }

    TclpExit(status);
    Tcl_Panic("OS exit failed!");

}
 
/*
 *-------------------------------------------------------------------------
 *
 * TclInitSubsystems --
 *