socket command with telnet servers
Closed / Fixed218332ffffffffffffffffffffffffffffffffffCreated 26 years agoUpdated 26 years ago
Descriptionplain2000-10-26 00:56:19
OriginalBugID: 3930 Bug
Version: 8.2.2
SubmitDate: '1999-12-23'
LastModified: '2000-01-10'
Severity: MED
Status: Closed
Submitter: techsupp
ChangedBy: hobbs
OS: Linux-Red Hat
OSVersion: Linux Mandrake 6.1 - (Redhat compatible)
FixedDate: '2000-10-25'
ClosedDate: '2000-01-10'
Name:
SL
ReproducibleScript:
proc read {sock} {
global gotread
puts "READ -> [gets $sock]"
set gotread 1
}
set sock [socket twoup.q-net.net.au 23]
vwait gotread
ObservedBehavior:
Just sits and does not respond (except for CTRL C / CTRLZ etc etc) but the gets command just hangs the script
DesiredBehavior:
well, for *something* to happen? and for it not to lock up
There's something else going on here, that wasn't properly entered
into the bug report (important info). This little snippet will
always hang, as expected, because the user is essentially making
a socket call, and then doing a vwait. The proc that is defined
will never be called. There is no use of fileevent, and the
user likely wants an -async socket. Also, it is unlikely that
redefining the core "read" command is a good idea. The user should
look at the socket examples in the Tcl FAQ:
http://www.purl.org/net/tcl-faq/
for some premade stuff, since there are already some basic telnet
communication scripts there as well.
-- 01/10/2000 hobbs
welch Closed ticket [218332ffff].
[History diff]2000-10-26 08:20:06
dgp Ticket [218332ffff]: 1 change
[History diff]2001-04-01 01:47:59
dgp Ticket [218332ffff]: 2 changes
[History diff]2001-04-01 01:48:00
Log in (anonymous is fine) to add a comment.