[Top][All Lists]

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

Re: Fwd: ncurses + a newly spawned xterm

From: Brad Beveridge
Subject: Re: Fwd: ncurses + a newly spawned xterm
Date: Mon, 5 Dec 2005 12:52:04 -0800

I was actually going to post a follow up to this today.  Last night I
managed to get a new xterm spawned and under ncurses control from
Lisp.  I've only tested a couple of functions, but all looks ok so
far.  I ended up using newterm to attach to the xterm's file
descriptors, which means my standard in/out come to/from the Lisp
console & the ncurses in/out go to the xterm - just what I wanted :)


On 12/5/05, Thomas Dickey <address@hidden> wrote:
> On Fri, Dec 02, 2005 at 10:51:41AM -0800, Brad Beveridge wrote:
> > After a bit of research, I found
> > http://cap.anu.edu.au/~wpc/blog/programming/pseudo-terminals.html,
> > which looks similar to what I want.  Looking further it seems that on
> > Linux I ought to be able to use forkpty() to create a new pseudo
> > terminal, and the master/slave descriptors.  I think that I can then
> > exec xterm from the newly created child process, passing it the master
> > FD, and setup the Lisp stdin/stdout to use the slave FD.  After all
> > this setup, can I use ncurses correctly from within my Lisp image and
> > have the ncurses commands go to the newly spawned xterm?
> I don't know - I would expect perhaps some problems getting buffers
> flushed, but perhaps not.  If your ncurses application uses newterm,
> you don't _have_ to use stdin/stdout (but then it would be more
> complicated to setup):
>        SCREEN *newterm(char *type, FILE *outfd, FILE *infd);
> --
> Thomas E. Dickey <address@hidden>
> http://invisible-island.net
> ftp://invisible-island.net

reply via email to

[Prev in Thread] Current Thread [Next in Thread]