(check_file): Report error right away if I/O fails,
authorJim Meyering <jim@meyering.net>
Mon, 22 Sep 2003 15:59:29 +0000 (15:59 +0000)
committerJim Meyering <jim@meyering.net>
Mon, 22 Sep 2003 15:59:29 +0000 (15:59 +0000)
commit8a0be33fd7cf9b7e2a11ad4a0d093ee4c886ea80
treeb9ad486eaf29906836c94c39d81528999d57454b
parentafd3a1e0662bc1ec1ccf779f2fbd2562decea519
(check_file): Report error right away if I/O fails,
so that the proper errno value is used.
(check_file): Check for ferror (stdout) even if ostream == stdout.
(check_file): Don't report bogus errno value
after ferror discovers an output error.  We don't know the proper
errno value, since it might have been caused by any of a whole
bunch of calls, and it might have been trashed in the meantime.
Fixing this problem will require much more extensive changes;
in the meantime just say "write error".
src/uniq.c