Fixed dup3 with stdin, stdin, stdout