I have a program that runs continously and prints to standard out when events happen. I need to write a script that executes this program, and acts on the output.
Would the best way to do this be to fork a child off, and pipe data back to parent? Or would it be easier to redirect the output of the program to a file and read that file?