The situation is that I have program started through system()
or CreateProcess()
.
Now, is it possible to do stuff as that program outputs data into console. I mean as the program outputs it. That is not wait for the end, gather data and then process it, but just in the moment that this external program calls console with data that it wants to print, and then get hold of that data, process it and output something else on the console.
On Linux, create a named pipe:
Then open the pipe in the first program, and start the program with:
I'm not sure how to do this on Windows.