telnet i/o redirection?
Randy Orrison
randy at umn-cs.cs.umn.edu
Fri Apr 15 01:48:39 AEST 1988
System: Silicon Graphics running SGI Unix 3.5 (?)
Silicon Graphics running ATT System V Release 3.2
I'm working on a project where we want to have a program talking to another
machine. I'd like to be able to have the program open up a couple pipes and
the fork off telnet to do the talking, but simple experiments with telnet
are proving to be dismal failures. I've tried the following approaches:
cat - | telnet
cat -u - | telnet
telnet < /dev/tty
The first two result in telnet accepting the "open" command and connecting,
but then ignoring the rest of my input, until I hit the intr key when telnet
acts as if it were processing my past input at the telnet> prompt. E.g.:
% cat - | telnet
telnet> open george
...connected...
Silicon Graphics (george)
(nothing.... i type: open george)
(nothing.... i hit DEL)
telnet> already connected to george telnet>
connection closed
%
(rough paraphrase). The last one (telnet < /dev/tty) hangs up the console
and requires a reboot.
On the vax running 4.3 here, the first two do about the same things, but the
last works just fine.
I suspect that telnet is doing some ioctls that screw up pipes. Does anyone
have any ideas what I can do? Note that I need the solution for System V
so i don't have ptys available (always did like BSD better...).
Thanks for all you help!
-randy
--
Randy Orrison, Control Data, Arden Hills, MN randy at ux.acss.umn.edu
(Anyone got a Unix I can borrow?) {ihnp4, seismo!rutgers, sun}!umn-cs!randy
What is a magician but a practising theorist?
-- Obi-Wan Kenobi
More information about the Comp.unix.questions
mailing list