mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2026-11-19 03:33:43 +03:00
(xfclose): Don't close stdout here (just flush it),
since close_stdout now closes stdout unconditionally.
This commit is contained in:
1 parent
3e0f7c5dc3
commit
d73a00981c
1 file changed
+6
@@ -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