}
while (++argind < argc);
- if (have_read_stdin && close (0) < 0)
+ if (have_read_stdin && close (STDIN_FILENO) < 0)
error (EXIT_FAILURE, errno, "-");
exit (exit_status == 0 ? EXIT_SUCCESS : EXIT_FAILURE);
/* Flush the output buffer. */
output ((char *) NULL, (char *) NULL);
- if (have_read_stdin && close (0) < 0)
+ if (have_read_stdin && close (STDIN_FILENO) < 0)
error (EXIT_FAILURE, errno, "-");
exit (errors == 0 ? EXIT_SUCCESS : EXIT_FAILURE);
}
tail_forever (F, n_files);
}
- if (have_read_stdin && close (0) < 0)
+ if (have_read_stdin && close (STDIN_FILENO) < 0)
error (EXIT_FAILURE, errno, "-");
exit (exit_status == 0 ? EXIT_SUCCESS : EXIT_FAILURE);
}
/* tee - read from standard input and write to standard output and files.
- Copyright (C) 85,1990-2001 Free Software Foundation, Inc.
+ Copyright (C) 85,1990-2002 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
POSIX requires that it work when given no arguments. */
errs = tee (argc - optind, (const char **) &argv[optind]);
- if (close (0) != 0)
+ if (close (STDIN_FILENO) != 0)
error (1, errno, _("standard input"));
exit (errs);
}
}
- if (close (0) != 0)
+ if (close (STDIN_FILENO) != 0)
error (EXIT_FAILURE, errno, _("standard input"));
exit (EXIT_SUCCESS);
max_line_length, _("total"));
}
- if (have_read_stdin && close (0))
+ if (have_read_stdin && close (STDIN_FILENO) != 0)
error (EXIT_FAILURE, errno, "-");
exit (exit_status == 0 ? EXIT_SUCCESS : EXIT_FAILURE);