#487 socket command with telnet servers

obsolete: 8.2.2
closed-fixed
nobody
2
2001-03-31
2000-10-26
Anonymous
No

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

Discussion

  • Brent B. Welch

    Brent B. Welch - 2000-10-26
    • priority: 5 --> 2
    • status: open --> closed-fixed
     
  • Don Porter

    Don Porter - 2001-03-31
    • labels: 104250 --> 27. Channel Types
     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks