groff-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[groff] 25/27: [troff]: Flush standard error when `ab`orting.


From: G. Branden Robinson
Subject: [groff] 25/27: [troff]: Flush standard error when `ab`orting.
Date: Sat, 2 Jul 2022 00:43:14 -0400 (EDT)

gbranden pushed a commit to branch master
in repository groff.

commit 99f4b2864a179fe100b09697b84136c3b5b3a307
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Fri Jul 1 23:23:53 2022 -0500

    [troff]: Flush standard error when `ab`orting.
    
    * src/roff/troff/input.cpp (abort_request): Flush the standard error
      stream before exiting, to improve chances of user seeing any message
      as arguments to the `ab` request.
---
 ChangeLog                | 6 ++++++
 src/roff/troff/input.cpp | 1 +
 2 files changed, 7 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index bd8fb6b4..dbf5321e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2022-07-01  G. Branden Robinson <g.branden.robinson@gmail.com>
+
+       * src/roff/troff/input.cpp (abort_request): Flush the standard
+       error stream before exiting, to improve chances of user seeing
+       any message as arguments to the `ab` request.
+
 2022-06-28  G. Branden Robinson <g.branden.robinson@gmail.com>
 
        * src/preproc/html/pre-html.cpp
diff --git a/src/roff/troff/input.cpp b/src/roff/troff/input.cpp
index b226fd07..75884297 100644
--- a/src/roff/troff/input.cpp
+++ b/src/roff/troff/input.cpp
@@ -7556,6 +7556,7 @@ void abort_request()
       fputs(asciify(c), stderr);
     fputc('\n', stderr);
   }
+  fflush(stderr);
   cleanup_and_exit(EXIT_FAILURE);
 }
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]