I'm writing my own shell, and need to be able to duplicate my output to stdout and a file at the same time for a forked process which then calls execve. To just change stdout to a file I know you do:
where outf is the open file. I'm not sure how to make it do both though... I tried:
tempf = dup(1);
to no avail.
Please help me shed light on this.