1 #!/bin/sh 2 # $NetBSD: siglist.sh,v 1.10 2016/03/16 23:01:33 christos Exp $ 3 # 4 # Script to generate a sorted, complete list of signals, suitable 5 # for inclusion in trap.c as array initializer. 6 # 7 8 : ${SED:=sed} 9 10 # The trap here to make up for a bug in bash (1.14.3(1)) that calls the trap 11 12 ${SED} -e '/^[ ]*#/d' -e 's/^[ ]*\([^ ][^ ]*\)[ ][ ]*\(.*[^ ]\)[ ]*$/#ifdef SIG\1\ 13 { .signal = SIG\1 , .name = "\1", .mess = "\2" },\ 14 #endif/' 15