[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

elf: openpty () usage question



I've been working on which should be a straightforward stream
redirector.  Open a tty device on a local machine.  Everything written
to the tty is passed over the network to another host.  Everything
written by that remote host on a similar device is sent back to the
local tty over the network.  

I've looked at the xterm code where it calls openpty and I've found
someone's source online that is supposed to do this.  The xterm code
doesn't shed much light and the rtty sample doesn't appear to work
(nor does it use openpty).

The question is this.  What does openpty return?  Do the master and
slave make a two-way pipe such that what is written to master can be
read on slave and vice versa?  If not, what exactly is the
relationship between them?

 -- Marc



Reply to: