summaryrefslogtreecommitdiff
path: root/src/preproc/refer
diff options
context:
space:
mode:
authorG. Branden Robinson <g.branden.robinson@gmail.com>2022-05-05 16:35:37 -0500
committerG. Branden Robinson <g.branden.robinson@gmail.com>2022-05-05 17:48:19 -0500
commitb8183a63a323b0469a7d7b34265a9c1fc843750a (patch)
tree905c7bbf936a642e491d89dbe6a205e1cb23134a /src/preproc/refer
parentf6eda6949a8fbb384bad5af410a0fdca4d6417ab (diff)
downloadgroff-git-b8183a63a323b0469a7d7b34265a9c1fc843750a.tar.gz
[refer]: Report system error on fflush() failure.
* src/preproc/refer/refer.cpp (main): Report system error on `fflush()` failure. POSIX Issue 2 a.k.a. SUSv2 (1997) specifies several possible `errno` values this C standard library function can set; see <https://pubs.opengroup.org/onlinepubs/007908799/xsh/fflush.html>.
Diffstat (limited to 'src/preproc/refer')
-rw-r--r--src/preproc/refer/refer.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/preproc/refer/refer.cpp b/src/preproc/refer/refer.cpp
index 76d594933..55ef9e574 100644
--- a/src/preproc/refer/refer.cpp
+++ b/src/preproc/refer/refer.cpp
@@ -386,7 +386,7 @@ int main(int argc, char **argv)
if (accumulate)
output_references();
if (fflush(stdout) < 0)
- fatal("output error");
+ fatal("output error: %1", strerror(errno));
return 0;
}