ajout des commentaires.
This commit is contained in:
parent
b4f25a50b0
commit
83066e1704
5
.vscode/settings.json
vendored
5
.vscode/settings.json
vendored
@ -1,5 +0,0 @@
|
|||||||
{
|
|
||||||
"files.associations": {
|
|
||||||
"unistd.h": "c"
|
|
||||||
}
|
|
||||||
}
|
|
8
pendu.c
8
pendu.c
@ -37,9 +37,13 @@ void display_hangman(int tries) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* this function display time out when user does nothing during 30s and verify signal*/
|
||||||
void sig_handler(int signum){
|
void sig_handler(int signum){
|
||||||
printf("\ntime out\n");
|
if (signum == SIGALRM){
|
||||||
exit (1);
|
|
||||||
|
printf("\ntime out\n");
|
||||||
|
exit (1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
|
Loading…
Reference in New Issue
Block a user