Xref: utzoo comp.unix.questions:6566 comp.unix.wizards:7784 Path: utzoo!mnetor!uunet!husc6!uwvax!umn-d-ub!umn-cs!randy From: randy@umn-cs.cs.umn.edu (Randy Orrison) Newsgroups: comp.unix.questions,comp.unix.wizards Subject: telnet i/o redirection? Message-ID: <4822@umn-cs.cs.umn.edu> Date: 14 Apr 88 15:48:39 GMT Reply-To: randy@umn-cs.UUCP (Randy Orrison) Organization: Control Data Lines: 40 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@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