diff options
author | andreas_kupries <akupries@shaw.ca> | 2004-07-15 20:46:17 (GMT) |
---|---|---|
committer | andreas_kupries <akupries@shaw.ca> | 2004-07-15 20:46:17 (GMT) |
commit | 597bb3236aba9dbe1c799b8bde917c1228fd21a1 (patch) | |
tree | 6b9b7f812be710b6ab81f81e35ba63a056c6926f /generic/tclIO.h | |
parent | 3c87843ad32da0db04bc580121a56049ad5cb367 (diff) | |
download | tcl-597bb3236aba9dbe1c799b8bde917c1228fd21a1.zip tcl-597bb3236aba9dbe1c799b8bde917c1228fd21a1.tar.gz tcl-597bb3236aba9dbe1c799b8bde917c1228fd21a1.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.
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 7f2c421..ea3c6e4 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.5.4.1 2004/05/19 19:16:24 andreas_kupries Exp $ + * RCS: @(#) $Id: tclIO.h,v 1.5.4.2 2004/07/15 20:46:19 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, |