DEBUG flags cleanup, some dead code removal
This commit is contained in:
23
signal.c
Normal file
23
signal.c
Normal file
@@ -0,0 +1,23 @@
|
||||
#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
|
||||
}
|
Reference in New Issue
Block a user