diff options
| author | dgp@users.sourceforge.net <dgp> | 2014-05-28 16:54:02 (GMT) | 
|---|---|---|
| committer | dgp@users.sourceforge.net <dgp> | 2014-05-28 16:54:02 (GMT) | 
| commit | 9f4965e8b63fe1681c4b6230dae2d0f78e2004bb (patch) | |
| tree | 2fa7e3ae46d7ac1154c7668e222a150c1f71ad62 /generic/tclIO.c | |
| parent | 12c2234b05132eaf1a7ae44832a1b4bd7c896ffb (diff) | |
| download | tcl-9f4965e8b63fe1681c4b6230dae2d0f78e2004bb.zip tcl-9f4965e8b63fe1681c4b6230dae2d0f78e2004bb.tar.gz tcl-9f4965e8b63fe1681c4b6230dae2d0f78e2004bb.tar.bz2  | |
Increase size of test io-29.34 so that it more portably tests the case where
the OS networking machinery gets backed up and blocks.
Added several TODO comments on potential simplifications.
Diffstat (limited to 'generic/tclIO.c')
| -rw-r--r-- | generic/tclIO.c | 9 | 
1 files changed, 9 insertions, 0 deletions
diff --git a/generic/tclIO.c b/generic/tclIO.c index 4e325ba..9e0d7f1 100644 --- a/generic/tclIO.c +++ b/generic/tclIO.c @@ -2555,6 +2555,7 @@ FlushChannel(  	PreserveChannelBuffer(bufPtr);  	toWrite = BytesLeft(bufPtr);  	if (toWrite == 0) { +	    /* TODO: This cannot happen. */  	    written = 0;  	} else {  	    written = (chanPtr->typePtr->outputProc)(chanPtr->instanceData, @@ -2667,6 +2668,8 @@ FlushChannel(  	    ReleaseChannelBuffer(bufPtr);  	    continue;  	} else { +	    /* TODO: Consider detecting and reacting to short writes +	     * on blocking channels.  Ought not happen.  See iocmd-24.2. */  	    wroteSome = 1;  	} @@ -2700,6 +2703,12 @@ FlushChannel(  	    ResetFlag(statePtr, BG_FLUSH_SCHEDULED);  	    (chanPtr->typePtr->watchProc)(chanPtr->instanceData,  		    statePtr->interestMask); +	} else { +	    /* TODO: If code reaches this point, it means a writable +	     * event is being handled on the channel, but the channel +	     * could not in fact be written to.  This ought not happen, +	     * but Unix pipes appear to act this way (see io-53.4). +	     * Also can imagine broken reflected channels. */  	}      }  | 
