Ok, so far that sounds about right.  I believe I have a book that details
how to do that.  However, I still need to figure out how to make the child
process use the ncurses window as its output.  I want ncurses in the child
process to think that its output window is the size of the window, and make
it so that it would (through ncurses render things correctly).

On 1/11/07, Andrew McNabb <[EMAIL PROTECTED]> wrote:

On Thu, Jan 11, 2007 at 12:04:10AM -0700, Daniel Dilts wrote:
>
> Also, how would I go about redirecting the stdin/out in a child process
so
> that I could send stuff to the child process and process the stdout of
the
> child process?  And how would I make it so that the child process
thought
> that its terminal was only the size of the ncurses window?

I'm a little light on details, but I think you're going to want to
create 1 or 2 pipes before you fork, and then reassign file descriptors
to 0 and 1 before execing, so that they become standard input and
standard output for the child process.

I can't think of any easier way to do it, and it's actually not all that
bad.


--
Andrew McNabb
http://www.mcnabbs.org/andrew/
PGP Fingerprint: 8A17 B57C 6879 1863 DE55  8012 AB4D 6098 8826 6868


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFFpoV6q01gmIgmaGgRAmJBAJ9ltIz3kBPqwv6KbBqlGVFz9GfAzwCgj/pd
O+d2IOqaIKMK6kokuM4dNJ8=
=GrKL
-----END PGP SIGNATURE-----


--------------------
BYU Unix Users Group
http://uug.byu.edu/

The opinions expressed in this message are the responsibility of their
author.  They are not endorsed by BYU, the BYU CS Department or BYU-UUG.
___________________________________________________________________
List Info: http://uug.byu.edu/cgi-bin/mailman/listinfo/uug-list


--------------------
BYU Unix Users Group http://uug.byu.edu/
The opinions expressed in this message are the responsibility of their
author. They are not endorsed by BYU, the BYU CS Department or BYU-UUG. ___________________________________________________________________
List Info: http://uug.byu.edu/cgi-bin/mailman/listinfo/uug-list

Reply via email to