Gitiles
Code Review
Sign In
gerrit-public.fairphone.software
/
fp2-dev
/
platform
/
external
/
strace
/
2b09df9731f97685b4c06e34ce4ff5f1686eb4c1
/
.
/
test
/
fork.c
blob: 1425e2dd3e3d457ebfff61fe4c9cc1af3ece7cf9 [
file
] [
log
] [
blame
]
#include
<stdlib.h>
#include
<unistd.h>
#include
<sys/wait.h>
int
main
(
int
argc
,
char
*
argv
[])
{
if
(
fork
()
==
0
)
{
write
(
1
,
"child\n"
,
6
);
}
else
{
wait
(
0
);
write
(
1
,
"parent\n"
,
7
);
}
exit
(
0
);
}