Re: GNU readline / tty related questions



emiller_news@xxxxxxxxx wrote:
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.

Tcl/Expect is open source and contains a C implementation of exactly
what you're talking about. It uses a pty and spawns a program in it.

Also, I believe the Tcl interpreter is specifically designed to be easy
to embed in another program (so that it is not a separate executable),
so maybe that is an option.

- Logan
.



Relevant Pages

  • Re: Countdown program - Exercise 5
    ... > I'd just separate the displayed counter and the end time. ... Even if a single event was delivered late, ... the design involved instrumenting every damned event handler ... I found using Tcl and C++ ...
    (comp.lang.tcl)
  • Re: TMML documents online
    ... > Having a separate section for environment variables affecting Tcl ... Tcl enters the event loop and handles whatever ...
    (comp.lang.tcl)
  • Re: channels and null end of messages
    ... you can't tell Tcl to use \u0000 ... as a line terminator and then use; ... messages run into each other and you are unable to separate them. ...
    (comp.lang.tcl)
  • Re: Comfortable source file size?
    ... > that I could separate out into separately sourced files. ... a big case for make-based development even with Tcl. ... tstinstall: /tmp/MyApp/bin/$ ... install packages or run pkgMkIndex. ...
    (comp.lang.tcl)
  • Re: competing panic declarations building expect on Mac OS X 10.3.4
    ... Rebuild Tcl using a new one. ... > You might have to show some logs to convince me that you rebuilt Tcl ... I found identical results when I fully installed tcl on a separate ...
    (comp.lang.tcl)