A some point in my program, it is necessary for me to start a child process (Im on linux, btw, ubuntu gutsy). The process streams DV to stdout, but can be controlled in an "interactive mode" through commands to stdin.
How does one establish streams going both ways? If you use the good ol C libs, you can use popen (but that is only one way commication) or you can use pipe(). My understanding is that when you call exec(), all existing streams are closed, and all of your local variables destroyed. And Im pretty sure (please correct if wrong) that even though a file descriptor is represented as an interger, passing that integer to the child process would be worthless.
How do I create two way communication with a newly fork'd and exec'd process that ties back to the parent? (I would much rather have a c++ solution, but a C solution would work just as well)