projects
/
platform
/
upstream
/
coreutils.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3e0f7c5
)
(xfclose): Don't close stdout here (just flush it),
author
Jim Meyering
<jim@meyering.net>
Sat, 6 Nov 2004 22:37:02 +0000
(22:37 +0000)
committer
Jim Meyering
<jim@meyering.net>
Sat, 6 Nov 2004 22:37:02 +0000
(22:37 +0000)
since close_stdout now closes stdout unconditionally.
src/sort.c
patch
|
blob
|
history
diff --git
a/src/sort.c
b/src/sort.c
index 511d0994d779bfe61cd9cf60ca949acc9bf39941..f607385b7b49e4244511d041d359ec363310b42c 100644
(file)
--- a/
src/sort.c
+++ b/
src/sort.c
@@
-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)