URL:
  <https://savannah.gnu.org/bugs/?67390>

                 Summary: [PATCH] [devpdf] BuildFoundries is too bullish
again, ignoring signals
                   Group: GNU roff
               Submitter: gbranden
               Submitted: Sun 03 Aug 2025 09:14:35 AM GMT
                Category: Font devpdf
                Severity: 3 - Normal
              Item Group: Incorrect behaviour
                  Status: None
                 Privacy: Public
             Assigned to: deri
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: None


    _______________________________________________________

Follow-up Comments:


-------------------------------------------------------
Date: Sun 03 Aug 2025 09:14:35 AM GMT By: G. Branden Robinson <gbranden>
When _afmtodit_(1) dies by a signal, "BuildFoundries" ignores it, and keeps
bulling right through, ignoring the user hammering Control+C at the terminal
window.

This is not correct behavior.

Here's a patch.  I also made the script report more information when anything
goes awry.  Please advise.


$ git diff
diff --git a/font/devpdf/util/BuildFoundries.pl
b/font/devpdf/util/BuildFoundries.pl
index 336ecd9fd..579835fa2 100644
--- a/font/devpdf/util/BuildFoundries.pl
+++ b/font/devpdf/util/BuildFoundries.pl
@@ -211,9 +211,18 @@ sub RunAfmtodit
 
     system("$cmd $enc '$afmfile' $map $gfont");
 
+    if ($? == -1) {
+       Die("unable to run afmtodit: $!\n");
+    }
+    elsif ($? & 127) {
+       Die("afmtodit terminated by signal " . ($? & 127) . ", "
+           . (($? & 128) ? "with" : "without") . " core dump");
+    }
+
     if ($?)
     {
-       Warn("failed running \"$cmd $enc '$afmfile' $map $gfont\"");
+       Warn("command \"$cmd $enc '$afmfile' $map $gfont\" exited"
+            . " with status $?");
        unlink $gfont;
        return('');
     }


Also see [https://perldoc.perl.org/functions/system].







    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?67390>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/

Attachment: signature.asc
Description: PGP signature

Reply via email to