projects
/
pspp
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
16a0854
)
(close_stdout_status): If ferror (stdout), do
author
Jim Meyering
<jim@meyering.net>
Thu, 20 Dec 2001 10:01:25 +0000
(10:01 +0000)
committer
Jim Meyering
<jim@meyering.net>
Thu, 20 Dec 2001 10:01:25 +0000
(10:01 +0000)
not silently exit merely because the output buffer happens to
have nothing pending.
lib/closeout.c
patch
|
blob
|
history
diff --git
a/lib/closeout.c
b/lib/closeout.c
index aee1fcbbafb5c7ce0a24c94c981633b046d7146a..0c78b6e4c3e0fd9b9a4a0a976542bc5c8f838fbe 100644
(file)
--- a/
lib/closeout.c
+++ b/
lib/closeout.c
@@
-94,7
+94,9
@@
close_stdout_status (int status)
{
int e = ferror (stdout) ? 0 : -1;
- if (__fpending (stdout) == 0)
+ /* If the stream's error bit is clear and there is nothing to flush,
+ then return right away. */
+ if (e && __fpending (stdout) == 0)
return;
if (fclose (stdout) != 0)