Skip to content
Tcl Source Code View Ticket
Login

View Ticket

small Tcl_MakeFileChannel issue

Closed / Invalid484023ffffffffffffffffffffffffffffffffffCreated 25 years agoUpdated 25 years ago
Descriptionplain2001-11-21 03:09:03
: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.
davygrvyplain2001-11-21 10:09:04
File Added - 13613: diff.txt
andreas_kupriesplain2001-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.
andreas_kupriesplain2001-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.
davygrvyplain2001-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...
Log in (anonymous is fine) to add a comment.

Attachments: