Compare commits

...
Author SHA1 Message Date
dgp 15f7687249 [65c9cd1534] Restore continuity of compatible function of [close] on a
channel type that defines both closeProc and close2Proc.

Move to a bug fix branch.  Need to build more confidence.
2020-03-04 18:26:12 +00:00
+4 -7
View File
@@ -3500,20 +3500,17 @@ Tcl_Close(
* it anymore and this will help avoid deadlocks on some channel types.
*/
if (
#ifndef TCL_NO_DEPRECATED
if ((chanPtr->typePtr->closeProc == TCL_CLOSE2PROC) || (chanPtr->typePtr->closeProc == NULL)) {
(chanPtr->typePtr->closeProc == TCL_CLOSE2PROC) ||
#endif
(chanPtr->typePtr->closeProc == NULL)) {
/* If this half-close gives a EINVAL, just continue the full close */
result = chanPtr->typePtr->close2Proc(chanPtr->instanceData, interp, TCL_CLOSE_READ);
if (result == EINVAL) {
result = 0;
}
}
#else
result = chanPtr->typePtr->close2Proc(chanPtr->instanceData, interp, TCL_CLOSE_READ);
if (result == EINVAL) {
result = 0;
}
#endif
/*
* The call to FlushChannel will flush any queued output and invoke the