Tcl Source Code

View Ticket
Login
Ticket UUID: 484023
Title: small Tcl_MakeFileChannel issue
Type: Bug Version: obsolete: 8.4a4
Submitter: davygrvy Created on: 2001-11-21 03:09:03
Subsystem: 27. Channel Types Assigned To: davygrvy
Priority: 5 Medium Severity:
Status: Closed Last Modified: 2001-12-07 09:10:09
Resolution: Invalid Closed By: davygrvy
    Closed on: 2001-12-07 02:10:09
Description:
:Windows

If you create a namedpipe which only uses one handle
for both read and write and give it to 
Tcl_MakeFileChannel(), a problem arises when the
channel is closed because the close2proc is set to
think read and write are 2 different handles and
closes each of them.  This goes *boom* :)

Attached is a patch that I think fixes this.

The core does not used namedpipes anywhere, but I
found this issue while working on Expect.
User Comments: davygrvy added on 2001-12-07 09:10:09:
Logged In: YES 
user_id=7549

After discovering NamedPipe handles have a notification 
problem that results in lost data on the other end a pipe 
connection that in no way is a problem with Tcl's pipe 
driver (I can see it call WriteFile() just fine!), I 
conclude this patch is useless :)

Who wrote this crappy OS?

closing forever...

andreas_kupries added on 2001-12-07 04:23:38:
Logged In: YES 
user_id=75003

Given to David so that he sees my question.
Just assign it back afterward.

andreas_kupries added on 2001-12-07 04:10:55:
Logged In: YES 
user_id=75003

Do we have tests in the testsuite with which we can check 
that that this change does not break things ? I looked at 
it and do not believe that it does break anythings, but I 
would like to check.

davygrvy added on 2001-11-21 10:09:04:

File Added - 13613: diff.txt

Attachments: