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
/
t04.c
blob
38f74c78818e49f6fbff91b31d0bcbdf275ff1f3
1
#include <stdio.h>
2
3
main
(
argc
,
argv
)
4
char
**
argv
;
5
{
6
int
fin
=
open
(
"/dev/console"
,
0
);
7
int
fout
=
open
(
"/dev/console"
,
1
);
8
int
ferr
=
open
(
"/dev/console"
,
1
);
9
int
pid
;
10
11
switch
(
pid
=
fork
()) {
12
case
0
:
/* child */
13
printf
(
"child
\n
"
);
14
return
(
1
);
15
case
-
1
:
16
perror
(
"fork"
);
17
return
(
2
);
18
19
default
:
20
printf
(
"parent %d
\n
"
,
pid
);
21
}
22
return
(
0
);
23
}