gbranden pushed a commit to branch master
in repository groff.

commit 313110f870c3148bcae2f9709623563df8e02fd7
Author: G. Branden Robinson <g.branden.robin...@gmail.com>
AuthorDate: Mon Jul 14 18:40:58 2025 -0500

    font/scripts/*: Use a better exit status.
    
    * font/scripts/gendesc.sh:
    * font/scripts/genfonts.sh: Exit with status 2, not 255, on usage error.
      The latter value is not good practice per POSIX--shells use the eighth
      bit of the exit status to indicate that a signal was received.
    
    See <https://pubs.opengroup.org/onlinepubs/9799919799/utilities/\
    V3_chap02.html#tag_19_08_02>.
---
 ChangeLog                | 11 +++++++++++
 font/scripts/gendesc.sh  |  2 +-
 font/scripts/genfonts.sh |  2 +-
 3 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index cc38454fa..16d9e4993 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2025-07-14  G. Branden Robinson <g.branden.robin...@gmail.com>
+
+       * font/scripts/gendesc.sh:
+       * font/scripts/genfonts.sh: Exit with status 2, not 255, on
+       usage error.  The latter value is not good practice per
+       POSIX--shells use the eighth bit of the exit status to indicate
+       that a signal was received.
+
+       See <https://pubs.opengroup.org/onlinepubs/9799919799/\
+       utilities/V3_chap02.html#tag_19_08_02>.
+
 2025-07-14  G. Branden Robinson <g.branden.robin...@gmail.com>
 
        * font/scripts/gendesc.sh:
diff --git a/font/scripts/gendesc.sh b/font/scripts/gendesc.sh
index db8ec7390..3e633bb20 100755
--- a/font/scripts/gendesc.sh
+++ b/font/scripts/gendesc.sh
@@ -3,7 +3,7 @@
 progname=${0##*/}
 if test -z "$1" || test -z "$2" || test -z "$3" || test -z "$4" || \
     test -z "$5"; then
-    echo "$progname: missing parameter"; exit 255;
+    echo "$progname: missing parameter"; exit 2;
 fi
 INPUT=$1
 RES=$2
diff --git a/font/scripts/genfonts.sh b/font/scripts/genfonts.sh
index a5ff3025c..b2ff82188 100755
--- a/font/scripts/genfonts.sh
+++ b/font/scripts/genfonts.sh
@@ -3,7 +3,7 @@
 # genfonts.sh <input .proto file> <RES> <CPI> <FONT name>
 progname=${0##*/}
 if test -z "$1" || test -z "$2" || test -z "$3" || test -z "$4"; then
-    echo "$progname: missing parameter"; exit 255;
+    echo "$progname: missing parameter"; exit 2;
 fi
 
 INPUT=$1

_______________________________________________
groff-commit mailing list
groff-commit@gnu.org
https://lists.gnu.org/mailman/listinfo/groff-commit

Reply via email to