I have finally worked out how to get stdin and stdout to pipe between the main app and a process created with CreateProcess (win32) or exec (linux). Now I am interested in harnessing the piping nature of an app. The app I am running can be piped into:
eg: cat file.txt | grep "a"
If I want to run "grep", sending the contents of "file.txt" to it (which I have in a buffer in my c++ app), how do I do this? I assume I don't just pump it down stdin, or am I wrong. Is that what I do?