mirror of
git://git.sv.gnu.org/coreutils.git
synced 2026-04-20 02:36:16 +02:00
(xfclose): Don't close stdout here (just flush it),
since close_stdout now closes stdout unconditionally.
This commit is contained in:
@@ -480,6 +480,12 @@ xfclose (FILE *fp, char const *file)
|
||||
if (feof (fp))
|
||||
clearerr (fp);
|
||||
}
|
||||
else if (fp == stdout)
|
||||
{
|
||||
/* Don't close stdout just yet. close_stdout does that. */
|
||||
if (fflush (fp) != 0)
|
||||
die (_("fflush failed"), file);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (fclose (fp) != 0)
|
||||
|
||||
Reference in New Issue
Block a user