summaryrefslogtreecommitdiffstats
path: root/generic/tclIO.h
diff options
context:
space:
mode:
authorandreas_kupries <akupries@shaw.ca>2008-12-18 23:48:39 (GMT)
committerandreas_kupries <akupries@shaw.ca>2008-12-18 23:48:39 (GMT)
commit0f677b288fdee4290767e09fdf5b53c15cca5bef (patch)
tree57e2f1fd28e81a55bd9fbdfed4fee4cfa375d6a0 /generic/tclIO.h
parent995eb54922eaaa97c8591d1368a1414bbf8aa22d (diff)
downloadtcl-0f677b288fdee4290767e09fdf5b53c15cca5bef.zip
tcl-0f677b288fdee4290767e09fdf5b53c15cca5bef.tar.gz
tcl-0f677b288fdee4290767e09fdf5b53c15cca5bef.tar.bz2
* generic/tclIO.c (Tcl_CloseEx,CloseWrite,CloseChannelPart,ChanCloseHalf):
Rewrite the half-close to properly flush the channel, like is done for a full close, going through FlushChannel, and using the flag BG_FLUSH_SCHEDULED (async flush during close). New functions CloseWrite, CloseChannelPart, new flag CHANNEL_CLOSEDWRITE. * tests/chanio.test (chanio-28.[67]): Reactivated these tests. Replaced tclsh -> [interpreter] to get correct executable for the pipe process, and added after cancel to kill the fail timers when we are done. Removed the explicits calls to [flush], now that [close] handles this correctly.
Diffstat (limited to 'generic/tclIO.h')
-rw-r--r--generic/tclIO.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/generic/tclIO.h b/generic/tclIO.h
index a90817b..fa78769 100644
--- a/generic/tclIO.h
+++ b/generic/tclIO.h
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclIO.h,v 1.14 2008/10/04 12:33:34 nijtmans Exp $
+ * RCS: @(#) $Id: tclIO.h,v 1.15 2008/12/18 23:48:39 andreas_kupries Exp $
*/
/*
@@ -339,6 +339,9 @@ typedef struct ChannelState {
* Used by Channel Tcl_Obj type to
* determine if we have to revalidate
* the channel. */
+#define CHANNEL_CLOSEDWRITE (1<<21) /* Channel write side has been closed.
+ * No further Tcl-level write IO on
+ * the channel is allowed. */
/*
* For each channel handler registered in a call to Tcl_CreateChannelHandler,