repo.or.cz
/
valgrind.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Bug 497723 - forgot to restore callgrind output cleanup
[valgrind.git]
/
none
/
tests
/
s390x
/
test_fork.c
blob
d0c7200ad66bf50b13da10e0cacaca839ef7dc3d
1
#include <asm/unistd.h>
2
#include
"test.h"
3
4
int
main
()
5
{
6
switch
(
svc0
(
__NR_fork
)) {
7
case
0
:
8
SAY
(
"child
\n
"
);
9
break
;
10
case
-
1
:
11
SAY
(
"error
\n
"
);
12
break
;
13
default
:
14
svc4
(
__NR_wait4
,
0
,
0
,
0
,
0
);
15
SAY
(
"parent
\n
"
);
16
break
;
17
}
18
EXIT
(
0
);
19
return
0
;
// shuts up the compiler
20
}