Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2012-04-16
13:17 • Closed ticket [3518244fff]: documentation for OPENFILECHANNELPROC may lead to bu... artifact: 12f0f3be21 user: dkf
01:19 • Ticket [3518244fff]: 4 changes artifact: ea47b99d5f user: lobotomy642
01:19 • Add attachment openFileChannelProc.patch to ticket [3518244fffffffff|35... artifact: 23b73f2ada user: lobotomy642
2012-04-15
18:19 • New ticket [3518244fff] documentation for OPENFILECHANNELPROC may lead to bugs</... artifact: 7635584924 user: lobotomy642

documentation for OPENFILECHANNELPROC may lead to bugs

Closed / Fixed3518244fffffffffffffffffffffffffffffffffCreated 15 years agoUpdated 15 years ago
Descriptionplain2012-04-15 18:19:24
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.
lobotomy642plain2012-04-16 01:19:25
File Added - 441251: openFileChannelProc.patch
dkfplain2012-04-16 13:17:00
allow_comments - 1

Needed fixing in all three main branches. Thanks for pointing this out.
Log in (anonymous is fine) to add a comment.

Attachments: