I\'m writing a c++ program that executes and outputs (in real-time) a shell script, makefile or just another program. However I would like to have my program return differen
Thanks for the reply about exit code Logan.
I believe a round-trip to get stderr would be to redirect it to a temporary file:
FILE* f = popen("cmd 2>/tmp/tmpfile.txt", "r");