Print statistics on SIGINT
This commit is contained in:
parent
a9ee64ed81
commit
bf2400fd98
8
main.c
8
main.c
@ -268,7 +268,15 @@ void printStatistics()
|
|||||||
printf("...\n");
|
printf("...\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void handleSIGINT()
|
||||||
|
{
|
||||||
|
printStatistics();
|
||||||
|
exit(0);
|
||||||
|
}
|
||||||
|
|
||||||
int main(int argc,char **argv) {
|
int main(int argc,char **argv) {
|
||||||
|
signal(SIGINT, handleSIGINT);
|
||||||
|
|
||||||
int i,j;
|
int i,j;
|
||||||
|
|
||||||
syntacticclass sclass;
|
syntacticclass sclass;
|
||||||
|
Loading…
Reference in New Issue
Block a user