og@litp.UUCP (05/13/87)
I work under UNIX 4.3bsd. I want to use a terminal as a slave
terminal. Say the master terminal is M and the slave is S. I need some
of the output produced by a program running on M to be routed to S and
I need that program to take some of its input from S.
Now the problem I have is the following: terminal S is not
hardwired and cannot be hardwired. So it's a plain regular terminal
that can only gain access to the system via login. This implies that a
shell is running on it. Thus it's allright to send data to it, but if
I type something on its keyboard what I type will be picked up by the
shell running on S rather than by the program I'm running on M
eventhough its awaiting input from S.
I suspect the solution lies in pseudo-terminals (pty's) but I
don't quite get how the whole thing works. The manual page is somewhat
cryptic to me. What I need in fact is some program or suggestion of
program that I could run on S and that could make it become a slave.
For those who know Multics I want the equivalent of the
"slave" command you can give at dialup time instead of "login".
--
UUCP: ...seismo!mcvax!inria!litp!og
BITNET: GIFFARD@FRCIRP71
Phone: +33 1 43 54 13 65
+33 1 43 36 25 25 ext. 4055weil@dataio.UUCP (05/15/87)
Simple, we do this all the time for developing screen oriented software. On the slave terminal simply run a small program which closes stdin and stout and sleeps forever. (If you need, you can also set it up to ignore interrupts.) Then any other program may open /dev/ttyxx and read and write from/to this terminal.