#include #include #include #include int main() { int fd; fd = open("f1.txt", O_WRONLY | O_CREAT | O_TRUNC, 0666); dup2(fd, 1); close(fd); if (fork() != 0) { dup2(2, 1); sleep(3); } else { sleep(1); printf("This line will not be printed on the screen."); } }