repo.or.cz
/
netbsd-mini2440.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Expand PMF_FN_* macros.
[netbsd-mini2440.git]
/
sys
/
arch
/
pmax
/
test
/
t06.c
blob
f016352cddd3a929713fcd90ced4f334247d533a
1
int
foo
;
2
3
main
(
argc
,
argv
)
4
char
**
argv
;
5
{
6
int
fout
=
open
(
"/dev/console"
,
1
);
7
int
i
;
8
9
foo
=
0
;
10
switch
(
fork
()) {
11
case
0
:
/* child */
12
foo
=
30
;
13
for
(
i
=
0
;
i
<
10
;
i
++) {
14
printf
(
"child %d, foo %d
\n
"
,
i
,
foo
);
15
foo
++;
16
}
17
return
(
1
);
18
19
case
-
1
:
20
perror
(
"fork"
);
21
return
(
2
);
22
23
default
:
24
for
(
i
=
0
;
i
<
10
;
i
++) {
25
printf
(
"parent %d foo %d
\n
"
,
i
,
foo
);
26
foo
++;
27
}
28
return
(
0
);
29
}
30
}