repositories
/
TD_SE.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
"Staticify" some functions to remove some warnings.
[TD_SE.git]
/
TD3
/
exo4
/
exo4.c
diff --git
a/TD3/exo4/exo4.c
b/TD3/exo4/exo4.c
index e835d0d44505cf72cfdb4acff9d5f8b13d379417..40337f6eb54225dacbffa417ee692a92379883ce 100644
(file)
--- a/
TD3/exo4/exo4.c
+++ b/
TD3/exo4/exo4.c
@@
-4,19
+4,25
@@
#include <stdio.h>
#include <stdlib.h>
#include <stdio.h>
#include <stdlib.h>
-void sigintP()
+
static
void sigintP()
{
{
+ printf("pid=%d\n", getpid());
+ signal(SIGINT, sigintP);
}
}
-void sigalrm()
+
static
void sigalrm()
{
{
+ exit(1);
}
}
-void sigintF()
+
static
void sigintF()
{
{
+ signal(SIGINT, SIG_IGN);
+ signal(SIGALRM, sigalrm);
+ alarm(5);
}
}
-void sigchld()
+
static
void sigchld()
{
int status;
wait(&status);
{
int status;
wait(&status);