Lines Matching defs:signal
68 #include <signal.h> /* required by sigaction & sig handling fncs */
73 #include <sys/ucontext.h> /* required by the signal handler */
102 /* the timer expires. If any other signal is received exit the */
105 /* Input: signal - signal number, intrested in SIGALRM! */
107 /* Return: exit -1 if unexpected signal is received */
111 static void sig_handler(int signal, /* signal number, set to handle SIGALRM */
116 int ret = 0; /* exit code from signal handler. */
121 if (signal == SIGALRM) {
128 fprintf(stderr, "signal caught - [%d] ", signal);
185 fprintf(stderr, "caught signal %d -- exiting.\n", signal);
396 int sig_ndx; /* index into signal handler structure. */
400 struct sigaction sigptr; /* set up signal, for interval timer */
403 int signum; /* signal number that hasto be handled */
404 char *signame; /* name of the signal to be handled. */
448 sigptr.sa_handler = (void (*)(int signal))sig_handler;