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]
/
verrou
/
verrou.c
1
// programme verrou.c
2
#include <unistd.h>
3
4
int
main
()
5
{
6
int
i
,
fd
=
1
;
7
if
(
fork
()) {
8
for
(
i
=
0
;
i
<
5
;
i
++) {
9
write
(
fd
,
"pere ecrit
\n
"
,
12
);
10
sleep
(
1
);
11
}
12
}
else
{
13
for
(
i
=
0
;
i
<
4
;
i
++) {
14
write
(
fd
,
"fils ecrit
\n
"
,
12
);
15
sleep
(
1
);
16
}
17
}
18
return
0
;
19
}