H0! I want to redirect output to a file and then direct to stdout again.
My aim is to print the first statement to file and the second to the stdout. But they both are printed to file. How to correct this? And can you summarize shortly that when i fork a new process, the file descriptor passes to the new process as i changed or the default descriptor is passed to the new process? Thanks in advance.
redir = open(name, O_WRONLY );