repositories
/
TD_SE.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
blame
|
history
|
raw
|
HEAD
Code cleanups.
[TD_SE.git]
/
tree
/
tree.c
1
#include <sys/types.h>
2
#include <unistd.h>
3
#include <stdio.h>
4
5
int
main
() {
6
pid_t p
;
7
int
i
,
n
=
5
;
8
9
for
(
i
=
0
;
i
<
n
;
i
++) {
10
p
=
fork
();
11
if
(
p
>
0
) {
12
break
;
13
}
14
printf
(
"Processus %d de pere %d
\n
"
,
getpid
(),
getppid
());
15
sleep
(
2
);
16
}
17
sleep
(
1
);
18
return
0
;
19
}