]> mj.ucw.cz Git - eval.git/commitdiff
Translate signal numbers to readable strings.
authorMartin Mares <mj@ucw.cz>
Thu, 5 Jul 2007 09:13:54 +0000 (11:13 +0200)
committerMartin Mares <mj@ucw.cz>
Thu, 5 Jul 2007 09:13:54 +0000 (11:13 +0200)
bin/lib

diff --git a/bin/lib b/bin/lib
index f85e52353fec131b8645f8313d0675d5ee4e7bdd..6f5c4763a0420d00acf80e7ea2f6da50e45c8a20 100644 (file)
--- a/bin/lib
+++ b/bin/lib
@@ -209,6 +209,13 @@ function test-result
                rm $TDIR/$TEST.pts
        fi
 
+       # Translate signal numbers to readable strings
+       SG=${M#Caught fatal signal }
+       if [ "$SG" != "$M" ] ; then
+               SG=`perl -MConfig -e '@s=split / /,$Config{sig_name}; print $s[$ARGV[0]]' $SG`
+               [ -z "$SG" ] || M="$M (SIG$SG)"
+       fi
+
        # Translate Free Pascal runtime errors to readable strings
        RE=${M#Exited with error status }
        if [ "$FREE_PASCAL_RTE" == 1 -a "$RE" != "$M" ] ; then