]> mj.ucw.cz Git - moe.git/commitdiff
Avoid Perl when printing signal names.
authorMartin Mares <mj@ucw.cz>
Sat, 13 Sep 2008 13:08:18 +0000 (15:08 +0200)
committerMartin Mares <mj@ucw.cz>
Sat, 13 Sep 2008 13:08:18 +0000 (15:08 +0200)
Use `kill -l $SIG` as suggested by Lukas Turek.

This was the only Perl dependency in the whole libeval.

eval/libeval.sh

index d3d0e96b0093826b15dfb9c135aa0477848d9cc1..6d2ffb1932bea9a0ad7232e2dbbfd0a27aedd051 100644 (file)
@@ -263,7 +263,7 @@ function test-result
        SG=${M#Caught fatal signal }
        SG=${SG#Committed suicide by signal }
        if [ "$SG" != "$M" ] ; then
-               SG=`perl -MConfig -e '@s=split / /,$Config{sig_name}; print $s[$ARGV[0]]' $SG`
+               SG=`kill -l $SG 2>/dev/null`
                [ -z "$SG" ] || M="$M (SIG$SG)"
        fi