Tcl Source Code

View Ticket
Login
Ticket UUID: 3518244
Title: documentation for OPENFILECHANNELPROC may lead to bugs
Type: Bug Version: obsolete: 8.4.19
Submitter: lobotomy642 Created on: 2012-04-15 18:19:24
Subsystem: 37. File System Assigned To: dkf
Priority: 5 Medium Severity:
Status: Closed Last Modified: 2012-04-16 13:17:00
Resolution: Fixed Closed By: dkf
    Closed on: 2012-04-16 06:17:00
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: dkf added on 2012-04-16 13:17:00:

allow_comments - 1

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

lobotomy642 added on 2012-04-16 01:19:25:

File Added - 441251: openFileChannelProc.patch

Attachments: