-
Stream stdout to file
Hi,
I want my program to launch another program and read std out from it..this isn't a problem. However this other program never returns it just keeps on spewing out data. I'm wanting to capture this data and stream it to a file as it's received. Is this possible? I can't do this in a loop in my program because it needs to do other processing in parallel to this task.
Any help much appreciated.
-
So are you just going to keep asking, or are you going to post an attempt using popen() or some mix of fork/exec/dup calls to allow two processes to communicate?
-
Don't feel like writing a response, so you get year+ old threads. See my code example here. YMMV.
http://cboard.cprogramming.com/showthread.php?t=57353