Tcl Source Code

View Ticket
Login
Ticket UUID: 3518244
Title: documentation for OPENFILECHANNELPROC may lead to bugs
Type: Bug Created on: 2012-04-15 18:19:24
Submitter: lobotomy642 Assigned to: dkf
Subsystem: 37. File System Severity:
Priority: 5 Medium Last modified: 2012-04-16 13:17:00
Status: Closed Closed by: dkf
Resolution: Fixed Closed on: 2012-04-16 06:17:00
Version: obsolete: 8.4.19
Description:
Hello,

At current time, the section in the man page about the FileSystem's callback function "openFileChannelProc" can lead to bugs, as the paragraph suggests we should register the channel in the interpreter with "RegisterChannel"; this is not the case as this can lead to crash in some use cases ("called Tcl_Close on channel with refCount > 0"), and the TclLib's function "Tcl_FSOpenFileChannel" states that this has to be done by its caller.

I propose the attached patch to the man page to remove the possible misunderstanding.
User Comments:
lobotomy642 added on 2012-04-16 01:19:25:

File Added - 441251: openFileChannelProc.patch

dkf added on 2012-04-16 13:17:00:

allow_comments - 1

Needed fixing in all three main branches. Thanks for pointing this out.

Attachments: