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