diff options
author | andreas_kupries <andreas_kupries@noemail.net> | 2004-07-15 20:46:48 (GMT) |
---|---|---|
committer | andreas_kupries <andreas_kupries@noemail.net> | 2004-07-15 20:46:48 (GMT) |
commit | 3694819656eef6ec2b930a8455aaeed206a528ee (patch) | |
tree | 57898ba81f1e08b32a243a13819f2637f6435d74 /generic/tclIO.h | |
parent | 7d1b5cd874c684b98c0aa7c44402aa6eaeb89bff (diff) | |
download | tcl-3694819656eef6ec2b930a8455aaeed206a528ee.zip tcl-3694819656eef6ec2b930a8455aaeed206a528ee.tar.gz tcl-3694819656eef6ec2b930a8455aaeed206a528ee.tar.bz2 |
* generic/tclIO.h (CHANNEL_INCLOSE): New flag. Set in
* generic/tclIO.c (Tcl_UnregisterChannel): 'Tcl_Close' while the
* generic/tclIO.c (Tcl_Close): close callbacks are
run. Checked in 'Tcl_Close' and 'Tcl_Unregister' to prevent
recursive call of 'close' in the close-callbacks. This is a
possible error made by implementors of virtual filesystems based
on 'tclvfs', thinking that they have to close the channel in the
close handler for the filesystem.
* generic/tclIO.c:
* generic/tclIO.h:
* Not reverting, but #ifdef'ing the changes from May 19, 2004 out
of the core. This removes the ***POTENTIAL INCOMPATIBILITY***
for channel drivers it introduced. This has become possible due
to Expect gaining a BlockModeProc and now handling blockingg and
non-blocking modes correctly. Thus [SF Tcl Bug 943274] is still
fixed if a recent enough version of Expect is used.
* doc/CrtChannel.3: Added warning about usage of a channel without
a BlockModeProc.
FossilOrigin-Name: ec897663074b212c6ade499ec456b1186d91ca4c
Diffstat (limited to 'generic/tclIO.h')
-rw-r--r-- | generic/tclIO.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/generic/tclIO.h b/generic/tclIO.h index a4eefd3..c0abec2 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.6 2004/05/19 19:41:10 andreas_kupries Exp $ + * RCS: @(#) $Id: tclIO.h,v 1.7 2004/07/15 20:46:49 andreas_kupries Exp $ */ /* @@ -296,6 +296,7 @@ typedef struct ChannelState { * the state of the channel changes. */ #define CHANNEL_RAW_MODE (1<<16) /* When set, notes that the Raw API is * being used. */ +#ifdef TCL_IO_TRACK_OS_FOR_DRIVER_WITH_BAD_BLOCKING #define CHANNEL_TIMER_FEV (1<<17) /* When set the event we are * notified by is a fileevent * generated by a timer. We @@ -323,6 +324,14 @@ typedef struct ChannelState { * will be performed if the * flag is set. This will * reset the flag as well. */ +#endif /* TCL_IO_TRACK_OS_FOR_DRIVER_WITH_BAD_BLOCKING */ + +#define CHANNEL_INCLOSE (1<<19) /* Channel is currently being + * closed. Its structures are + * still live and usable, but + * it may not be closed again + * from within the close handler. + */ /* * For each channel handler registered in a call to Tcl_CreateChannelHandler, |