Skip to content

Instantly share code, notes, and snippets.

@chergert
Created April 1, 2014 16:31
Show Gist options
  • Save chergert/9917771 to your computer and use it in GitHub Desktop.
Save chergert/9917771 to your computer and use it in GitHub Desktop.
print names of signal numbers.
#include <signal.h>
#include <stdio.h>
#include <string.h>
int
main (int argc,
char *argv[])
{
const char *str;
int i;
for (i = 0; i < NSIG; i++) {
str = strsignal (i);
printf ("%02d: %s\n", i, str);
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment