All errors go to stdout either directly or by redirection from stderr

edge.strict_endians
szaka 2005-11-27 11:51:10 +00:00
parent 93fabaf0c4
commit f827828d5c
1 changed files with 2 additions and 4 deletions

View File

@ -523,10 +523,8 @@ static int parse_options(int argc, char **argv)
/* Redirect stderr to stdout, note fflush()es are essential! */
fflush(stdout);
fflush(stderr);
if (dup2(STDOUT_FILENO, STDERR_FILENO) == -1) {
perror("Failed to redirect stderr to stdout");
exit(1);
}
if (dup2(STDOUT_FILENO, STDERR_FILENO) == -1)
perr_exit("Failed to redirect stderr to stdout");
fflush(stdout);
fflush(stderr);