(xfclose): Don't close stdout here (just flush it),

since close_stdout now closes stdout unconditionally.
This commit is contained in:
Jim Meyering committed 2004-11-06 22:37:02 +00:00
1 parent 3e0f7c5dc3
commit d73a00981c
1 file changed
+6
+6
View File
@@ -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)