bug-groff
[Top][All Lists]
Advanced

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

[PATCH] Use POSIX-compliant 'trap' arguments


From: Colin Watson
Subject: [PATCH] Use POSIX-compliant 'trap' arguments
Date: Sat, 20 Feb 2010 03:00:18 +0000
User-agent: Mutt/1.5.18 (2008-05-17)

Among other things fixed a while ago,
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=256226 reports that
groff uses the 'trap' builtin with numeric signal names rather than
named signal names.  POSIX only supports named signal names and '0'; the
other numeric signals are XSI extensions.  There seems no reason not to
use the portable forms in groff.

Here's an updated patch.

=== modified file 'contrib/eqn2graph/eqn2graph.sh'
--- contrib/eqn2graph/eqn2graph.sh      2008-09-29 00:53:28 +0000
+++ contrib/eqn2graph/eqn2graph.sh      2010-02-20 02:57:25 +0000
@@ -75,7 +75,7 @@ if test -z "$tmp"; then
     { (exit 1); exit 1; }
 fi
 
-trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 2 15 
+trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' EXIT INT TERM
 
 # Here goes:
 # 1. Add .EQ/.EN.

=== modified file 'contrib/grap2graph/grap2graph.sh'
--- contrib/grap2graph/grap2graph.sh    2005-05-18 07:03:06 +0000
+++ contrib/grap2graph/grap2graph.sh    2010-02-20 02:57:25 +0000
@@ -71,7 +71,7 @@ if test -z "$tmp"; then
     { (exit 1); exit 1; }
 fi
 
-trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 2 15 
+trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' EXIT INT TERM
 
 # Here goes:
 # 1. Add .G1/.G2.

=== modified file 'contrib/pic2graph/pic2graph.sh'
--- contrib/pic2graph/pic2graph.sh      2008-09-29 00:53:28 +0000
+++ contrib/pic2graph/pic2graph.sh      2010-02-20 02:57:25 +0000
@@ -86,7 +86,7 @@ if test -z "$tmp"; then
     { (exit 1); exit 1; }
 fi
 
-trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 2 15 
+trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' EXIT INT TERM
 
 # Here goes:
 # 1. Wrap the input in dummy .PS/PE macros (and add possibly null .EQ/.EN)

Thanks,

-- 
Colin Watson                                       address@hidden




reply via email to

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