repositories
/
TD_SE.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fa1b480
)
Add TD3 exo4 correction.
author
Jérôme Benoit
<jerome.benoit@piment-noir.org>
Mon, 26 Feb 2018 23:39:31 +0000
(
00:39
+0100)
committer
Jérôme Benoit
<jerome.benoit@piment-noir.org>
Mon, 26 Feb 2018 23:39:31 +0000
(
00:39
+0100)
Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
TD3/exo4/exo4.c
patch
|
blob
|
blame
|
history
diff --git
a/TD3/exo4/exo4.c
b/TD3/exo4/exo4.c
index e835d0d44505cf72cfdb4acff9d5f8b13d379417..717a9d7a29ae176fb045211b2e354ad0025d6ec0 100644
(file)
--- 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()