How can I read from the stdout of my program?
One of my threads needs to access the stdout to read what the other threads are logging.
I'm using the dear old plain C.
How can I read from the stdout of my program?
One of my threads needs to access the stdout to read what the other threads are logging.
I'm using the dear old plain C.
You shouldn't. stdout is supposed to be the output to your program and you're not therefore supposed to be reading it in as well. If you want to do this, do your logging elsewhere.
If I understand you correctly, you want your threads to communicate with each other. Using stdout for inter-thread communication doesn't seem to be the right way to solve this problem.
Perhaps you should try a Web search for "communication between threads".