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

Attachment: signature.asc
Description: Digital 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

Reply via email to