The situation I have is this: I'm redirecting input from one spot in my program to another through a pipe. However, it does not appear that this is working correctly, so I'd like to monitor what's going through the pipe.
Currently, I'm using dup2() to simply overwrite the stdin and stdout from the pipe.
How can I monitor what's going between the pipe?