logo

utils-std

Collection of commonly available Unix tools git clone https://anongit.hacktivis.me/git/utils-std.git

sys_signame.sh (687B)


  1. #!/bin/sh
  2. cat <<-EOF
  3. // utils-std: Collection of commonly available Unix tools
  4. // SPDX-FileCopyrightText: 2017 Haelwenn (lanodan) Monnier <contact+utils@hacktivis.me>
  5. // SPDX-License-Identifier: CC0-1.0 OR WTFPL
  6. // /!\ File generated by lib/sys_signame.sh avoid editing
  7. #include "sys_signame.h"
  8. const char *util_sys_signame[NSIG] = {
  9. EOF
  10. # From signal.h definition in POSIX
  11. for i in SIGABRT SIGALRM SIGBUS SIGCHLD SIGCONT SIGFPE SIGHUP SIGILL SIGINT SIGKILL SIGPIPE SIGQUIT SIGSEGV SIGSTOP SIGTERM SIGTSTP SIGTTIN SIGTTOU SIGUSR1 SIGUSR2 SIGWINCH SIGSYS SIGTRAP SIGURG SIGVTALRM SIGXCPU SIGXFSZ
  12. do
  13. printf '#ifdef %s\n\t[%s] = "%s",\n#endif\n' "$i" "$i" "${i#SIG}"
  14. done
  15. printf '};\n'