Skip to content
Tcl Source Code View Ticket
Login

View Ticket

Can't catch { close $async_socket }

Closed / Fixed217941ffffffffffffffffffffffffffffffffffCreated 26 years agoUpdated 26 years ago
Descriptionplain2000-10-26 00:46:22
OriginalBugID: 3663 Bug
Version: 8.2.1
SubmitDate: '1999-11-23'
LastModified: '1999-11-29'
Severity: CRIT
Status: Closed
Submitter: techsupp
ChangedBy: hobbs
RelatedBugIDs: 1356
OS: Macintosh
OSVersion: 8.5.1
Machine: all kinds of PowerPC
FixedDate: '2000-10-25'
ClosedDate: '1999-11-29'


Name:
Q. Alex Zhao

Extensions:
none

ReproducibleScript:
I have a client-server program that uses async sockets and file event
handlers. The client does
        catch { close $socket2server }
        after 10000 reconnect
if the connection is broken (gets or puts returns an error). Here
"socket2server" is the async, line buffering, non-blocking socket with a
"readable" file event handle. This code works fine on Unix. But on a Mac
(G3 + OS 8.5.1 + Tcl/Tk 8.2.1), it says something in the line of "can't
close async socket file handle" and freezes the Mac.

ObservedBehavior:
"catch" didn't catch anything. Tcl/Tk (not my program) popped up a window saying "error closing async socket" and exited (or crashed).

If I don't use "catch {close ...}" and just "unset" the variable, still the same error.

DesiredBehavior:
catch the error. Don't crash the system.
welch Closed ticket [217941ffff]. [History diff]2000-10-26 08:10:55
dgp Ticket [217941ffff]: 3 changes [History diff]2001-04-05 08:20:14
Log in (anonymous is fine) to add a comment.