gbranden pushed a commit to branch master
in repository groff.

commit 4f34230ab9ae45630b543cf77b20cf86921e47b2
Author: G. Branden Robinson <[email protected]>
AuthorDate: Fri Oct 2 22:21:27 2026 -0500

    [mm]: Fix Savannah #68733.
    
    * contrib/mm/mmroff.pl: Throw fatal error if `close()` returns
      abnormally, so that we can inform the user whether and how groff(1)
      exited.
    
    Fixes <https://savannah.gnu.org/bugs/?68733>.  Thanks to Ingo Schwarze
    for the Perl advice.
---
 contrib/mm/ChangeLog | 8 ++++++++
 contrib/mm/mmroff.pl | 5 +++--
 2 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/contrib/mm/ChangeLog b/contrib/mm/ChangeLog
index 04e489e0c..dc3c8df95 100644
--- a/contrib/mm/ChangeLog
+++ b/contrib/mm/ChangeLog
@@ -1,3 +1,11 @@
+2026-10-02  G. Branden Robinson <[email protected]>
+
+       * mmroff.pl: Throw fatal error if `close()` returns abnormally,
+       so that we can inform the user whether and how groff(1) exited.
+
+       Fixes <https://savannah.gnu.org/bugs/?68733>.  Thanks to Ingo
+       Schwarze for the Perl advice.
+
 2026-10-02  G. Branden Robinson <[email protected]>
 
        * mmroff.pl: Relocate `Die` subroutine to define it earlier, to
diff --git a/contrib/mm/mmroff.pl b/contrib/mm/mmroff.pl
index 9356eeabf..93f253c1d 100644
--- a/contrib/mm/mmroff.pl
+++ b/contrib/mm/mmroff.pl
@@ -138,8 +138,9 @@ while(<MACRO>) {
        s#\\ \\ $##;
        push(@out, $_);
 }
-close(MACRO);
-
+close(MACRO)
+       or Die($! ? "error closing pipeline \"$first_pass\": $!"
+                 : "\"$first_pass\" exited with status $?");
 
 # TODO: We should write out references only if there are any; a document
 # that uses only `PIC` might lack them.

_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit

Reply via email to