Fixed a bashism with trap numbers in hgeditor.
authorJavi Merino <cibervicho@gmail.com>
Tue, 11 May 2010 12:06:30 +0200
changeset 11190 43337076ba92
parent 11189 3ef2572de32f
child 11191 c45a47bc4114
Fixed a bashism with trap numbers in hgeditor. When using trap in a shell script, it's more portable to use signal names, instead of numbers. Signal names (INT, KILL,...) are defined in POSIX, whereas its corresponding numbers aren't.
hgeditor
--- a/hgeditor	Mon May 17 21:30:00 2010 +0200
+++ b/hgeditor	Tue May 11 12:06:30 2010 +0200
@@ -25,7 +25,7 @@
 
 # Remove temporary files even if we get interrupted
 trap "cleanup_exit" 0 # normal exit
-trap "exit 255" 1 2 3 6 15 # HUP INT QUIT ABRT TERM
+trap "exit 255" HUP INT QUIT ABRT TERM
 
 HGTMP="${TMPDIR-/tmp}/hgeditor.$RANDOM.$RANDOM.$RANDOM.$$"
 (umask 077 && mkdir "$HGTMP") || {