Always use STDIN_FILENO for input and STDOUT_FILENO
authorJim Meyering <jim@meyering.net>
Sat, 1 May 1999 02:05:56 +0000 (02:05 +0000)
committerJim Meyering <jim@meyering.net>
Sat, 1 May 1999 02:05:56 +0000 (02:05 +0000)
commit9fca49f67c16c8b42c32e185808fe187cedb0fa7
tree2376d2440eaae0b5421bd4b49120d174a94ce33d
parent8a3c0671e03da7ef9ea774d9adb8b7b341b29c51
Always use STDIN_FILENO for input and STDOUT_FILENO
for output, to avoid confusion with closed input and output fds.
(input_fd, output_fd): Remove; all uses changed to STDIN_FILENO
and STDOUT_FILENO.
(open_fd): New function.
(main): Use it, instead of open, to ensure that file descriptors
don't get confused.

(skip): Don't fstat the input file; the result is no longer used.
src/dd.c