Hello,
How do I go about opening a pipe to a new process? What I would
like to write a program that monitors another program. Ideally,
I would like the parent program to start the child monitor program
and then write data to it (likely via pipe), which the monitor
program would consume and use to update it's progress display.
How do I create a pipe from a parent process to a child process
that the parent starts? I don't think I can use fork() and
pipe() because my parent process uses lots of memory. As I
understand it, calling fork() gives the child process a copy of
the parent's heap, which is not a realistic option given that my
program eats as much memory as I can feed it. I think popen()
also uses fork(), which as I said before probably isn't a good
idea in my case.
Any hints that might point me in the right direction would be
tremendously appreciated.
Thanks.
Derek