Print statistics on SIGINT

This commit is contained in:
Patrick Lühne 2018-01-26 18:47:11 +01:00
parent a9ee64ed81
commit bf2400fd98
No known key found for this signature in database
GPG Key ID: 05F3611E97A70ABF
1 changed files with 8 additions and 0 deletions

8
main.c
View File

@ -268,7 +268,15 @@ void printStatistics()
printf("...\n");
}
void handleSIGINT()
{
printStatistics();
exit(0);
}
int main(int argc,char **argv) {
signal(SIGINT, handleSIGINT);
int i,j;
syntacticclass sclass;