Re: GNU readline / tty related questions



On 28 Mai, 16:55, Logan Shaw <lshaw-use...@xxxxxxxxxxxxx> wrote:
emiller_n...@xxxxxxxxx wrote:
On 26 Mai, 03:25, Barry Margolin <bar...@xxxxxxxxxxxx> wrote:

Use a pseudo-tty(pty) rather than a pipe. You might want to make use
of Expect, a scripting language specifically designed for controlling
interactive programs.
Can you point me to some HOWTO or examples?

You apparently haven't tried typing "expect" into google and
clicking on the first link.

Correct. I was visiting some other pages on Expect. My impression is
that Expect is not exactly targeted at my purposes although it might
be possible to use it with some detouring. So I put my question more
specifically:

How can I open a tty or pty from a C/C++ program, start a process
inside that terminal and have character-level communication between
the C/C++ program and the terminal input/output?

If this is possible with Excpect, this is fine, but it wouldn't help
me in the long run, because I can't use an intermediate Tcl program,
nor does the Tcl code help me with the C implementation.

Thanks
Edi

.