Using One Application With Multiple Terminals???
Avi Freedman
freedman at euclid.math.temple.edu
Tue Dec 12 13:14:42 AEST 1989
What would be involved in writing something for Unix
(specifically for Sys V) that would hook up multiple
terminals to the same program? This would be really
great for technical support, i.e. teaching people vi
or FoxBase or whatever.
I assume (at least with Berkeley, with which I am
more familiar), that one could have a number of clients
which connect to a "helper" program. The application
program to be shared would be forked by a program which
first connect to the "helper" program via a socket, and
would then remap stdin, stdout, and stderr to this socket
and fork the application program itself (vi, FoxBase, or
whatever). The "helper" program would sit there in a
select() system call checking for reads for the stdout
of the terminals or writes from the stdout of the
application, and would then route the data appropriately.
Is this a good way to go about it? In particular, what
if (horror of horrors), someone were to open "/dev/tty"
instead of using stdin/stdout/stderr?
Has anyone done a program like this? Unfortunaltely,
I don't have access to the source for Berkeley's script
program.
Any help would be appreciated.
-- Avi Freedman
freedman at euclid.math.temple.edu
More information about the Comp.unix.wizards
mailing list