Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2001-04-13
23:11 • Ticket [217813ffff] Windows only: Sockets may stay open on OS level after 'c... artifact: feba87f0ab user: dgp
2000-10-26
07:49 • Closed ticket [217813ffff]. artifact: c6ded6c86e user: welch
00:44 • New ticket [217813ffff]. artifact: 72bee9a946 user: nobody

Windows only: Sockets may stay open on OS level after 'close

Closed / Duplicate217813ffffffffffffffffffffffffffffffffffCreated 26 years agoUpdated 26 years ago
Descriptionplain2000-10-26 00:44:04
OriginalBugID: 1353 Bug
Version: 8.0.4
SubmitDate: '1999-03-02'
LastModified: '1999-03-02'
Severity: SER
Status: Closed
Submitter: pat
ChangedBy: pat
OS: Windows NT
OSVersion: 4.0
Machine: X86
FixedDate: '2000-10-25'
ClosedDate: '1999-03-02'


Name:
ThomaS

ReproducibleScript:
#Observe TCP connection with netstat in a DOS-Box. Open connections have state #ESTABLISHED. 
#
# Assuming a socket server is running on host vmsaxp and port 7412. The local
# host is named artemis. 
#
# 1) behaves fine
set sock [socket vmsaxp 7412];
# TCP connection  artemis:2519 has state ESTABLISHED.
close $sock;
# TCP connection  artemis:2519 has state TIME_WAIT or disappeared from
# netstat list.
#
# 2) misbehaves.
set sock [socket vmsaxp 7412];
# TCP connection  artemis:2519 has state ESTABLISHED.
exec wish80 &
close $sock;
# TCP connection  artemis:2519 still has the state ESTABLISHED.
# the connection will be closed when the external process ends.

ObservedBehavior:
The TCP connection from the client to the server stays open, especially the server doesn't receive an EOF. The open socket cannot be contacted from tcl, neither from the parent shell nor from the spawned child shell.

DesiredBehavior:
After the close statement the connection should be closed. 

Patch:
Somehow the spawn process inherits the open file descriptors of its parent. I think a flag supressing this behaviour must be set when calling CreateProcess() in tclWinPipe.c.



03/02/1999 16:47 - pat - duplicate of bug 1250
welch Closed ticket [217813ffff]. [History diff]2000-10-26 07:49:19
dgp Ticket [217813ffff]: 3 changes [History diff]2001-04-13 23:11:02
Log in (anonymous is fine) to add a comment.