Imported from ../bash-1.14.7.tar.gz.
This commit is contained in:
commit
726f63884d
402 changed files with 150297 additions and 0 deletions
27
CWRU/misc/sigs.c
Normal file
27
CWRU/misc/sigs.c
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
#include <signal.h>
|
||||
#include <stdio.h>
|
||||
|
||||
extern char *sys_siglist[];
|
||||
|
||||
typedef void sighandler();
|
||||
|
||||
main(argc, argv)
|
||||
int argc;
|
||||
char **argv;
|
||||
{
|
||||
register int i;
|
||||
sighandler *h;
|
||||
|
||||
for (i = 1; i < NSIG; i++) {
|
||||
h = signal(i, SIG_DFL);
|
||||
if (h != SIG_DFL) {
|
||||
if (h == SIG_IGN)
|
||||
fprintf(stderr, "%d: ignored (%s)\n", i, sys_siglist[i]);
|
||||
else
|
||||
fprintf(stderr, "%d: caught (%s)\n", i, sys_siglist[i]);
|
||||
}
|
||||
}
|
||||
exit(0);
|
||||
}
|
||||
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue