how to redirecting the standard output in program
My program will do the pixel processing for output of other program.
So, I need redirect the output of the program from standard Output to my specified pipe
I do as this way in program:
...
dup2(fds[0],STDOUT_FILENO);
exelclp("runout","runout",NULL);
...
But it cannot work, I think execlp take place the my program, so dup2 cannot do its work in new process.
So, how to do?
if use the buffer, /dev/tty, how to do?
|