From: Jérôme Benoit Date: Mon, 26 Feb 2018 23:39:31 +0000 (+0100) Subject: Add TD3 exo4 correction. X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=84f86bf023000bab0245ad43204a409eab734b07;p=TD_SE.git Add TD3 exo4 correction. Signed-off-by: Jérôme Benoit --- diff --git a/TD3/exo4/exo4.c b/TD3/exo4/exo4.c index e835d0d..717a9d7 100644 --- a/TD3/exo4/exo4.c +++ b/TD3/exo4/exo4.c @@ -6,14 +6,20 @@ void sigintP() { + printf("pid=%d\n", getpid()); + signal(SIGINT, sigintP); } void sigalrm() { + exit(1); } void sigintF() { + signal(SIGINT, SIG_IGN); + signal(SIGALRM, sigalrm); + alarm(5); } void sigchld()