Tcl Source Code

Check-in [81346a2dc2]
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 trunk
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | tip-400-impl | tip-vote
Files: files | file ages | folders
SHA1: 81346a2dc278ac49fd1fc5964db2bf4594ec684b
User & Date: dkf 2012-10-04 08:25:52
Context
2012-10-16
12:50
merge trunk Closed-Leaf check-in: 006482c0ff user: dkf tags: tip-400-impl
2012-10-04
08:25
merge trunk check-in: 81346a2dc2 user: dkf tags: tip-400-impl, tip-vote
08:24
clean up some of the code to remove warnings and uselessly-settable things check-in: 27db6ec7f9 user: dkf tags: tip-400-impl
2012-10-03
15:39
When checking for std channels being closed, compare the channel state, not the channel itself so th... check-in: 986eb391ad user: dgp tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to ChangeLog.







1
2
3
4
5
6
7





2012-09-26  Reinhard Max  <[email protected]>

	* generic/tclIOSock.c (TclCreateSocketAddress): Work around a bug
	in getaddrinfo() on OSX that caused name resolution to fail for
	[socket -server foo -myaddr localhost 0].

2012-09-20  Jan Nijtmans  <[email protected]>
>
>
>
>
>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
2012-10-03  Don Porter  <[email protected]>

	* generic/tclIO.c:	When checking for std channels being closed,
	compare the channel state, not the channel itself so that stacked
	channels do not cause trouble.

2012-09-26  Reinhard Max  <[email protected]>

	* generic/tclIOSock.c (TclCreateSocketAddress): Work around a bug
	in getaddrinfo() on OSX that caused name resolution to fail for
	[socket -server foo -myaddr localhost 0].

2012-09-20  Jan Nijtmans  <[email protected]>

Changes to generic/tclIO.c.

875
876
877
878
879
880
881
882


883
884
885
886
887
888


889
890
891
892
893
894


895
896
897
898
899
900
901
static void
CheckForStdChannelsBeingClosed(
    Tcl_Channel chan)
{
    ChannelState *statePtr = ((Channel *) chan)->state;
    ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey);

    if ((chan == tsdPtr->stdinChannel) && tsdPtr->stdinInitialized) {


	if (statePtr->refCount < 2) {
	    statePtr->refCount = 0;
	    tsdPtr->stdinChannel = NULL;
	    return;
	}
    } else if ((chan == tsdPtr->stdoutChannel) && tsdPtr->stdoutInitialized) {


	if (statePtr->refCount < 2) {
	    statePtr->refCount = 0;
	    tsdPtr->stdoutChannel = NULL;
	    return;
	}
    } else if ((chan == tsdPtr->stderrChannel) && tsdPtr->stderrInitialized) {


	if (statePtr->refCount < 2) {
	    statePtr->refCount = 0;
	    tsdPtr->stderrChannel = NULL;
	    return;
	}
    }
}






|
>
>





|
>
>





|
>
>







875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
static void
CheckForStdChannelsBeingClosed(
    Tcl_Channel chan)
{
    ChannelState *statePtr = ((Channel *) chan)->state;
    ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey);

    if (tsdPtr->stdinInitialized
	    && tsdPtr->stdinChannel != NULL
	    && statePtr == ((Channel *)tsdPtr->stdinChannel)->state) {
	if (statePtr->refCount < 2) {
	    statePtr->refCount = 0;
	    tsdPtr->stdinChannel = NULL;
	    return;
	}
    } else if (tsdPtr->stdoutInitialized
	    && tsdPtr->stdoutChannel != NULL
	    && statePtr == ((Channel *)tsdPtr->stdoutChannel)->state) {
	if (statePtr->refCount < 2) {
	    statePtr->refCount = 0;
	    tsdPtr->stdoutChannel = NULL;
	    return;
	}
    } else if (tsdPtr->stderrInitialized
	    && tsdPtr->stderrChannel != NULL
	    && statePtr == ((Channel *)tsdPtr->stderrChannel)->state) {
	if (statePtr->refCount < 2) {
	    statePtr->refCount = 0;
	    tsdPtr->stderrChannel = NULL;
	    return;
	}
    }
}