24 lines
315 B
C
24 lines
315 B
C
#include <stdio.h>
|
|
#include <signal.h>
|
|
|
|
int sigint_received=0;
|
|
|
|
static void stopall()
|
|
{
|
|
printf("SIGINT RECEIVED: aborting eval\n");
|
|
sigint_received=1;
|
|
}
|
|
|
|
int stopped()
|
|
{
|
|
return sigint_received;
|
|
}
|
|
|
|
void set_intr()
|
|
{
|
|
signal(SIGINT, stopall);
|
|
# ifdef DEBUG
|
|
printf("SIGINT armed.\n");
|
|
# endif
|
|
}
|