test_fork.c revision 436e89c602e787e7a27dd6624b09beed41a0da8a
1#include <asm/unistd.h>
2#include "test.h"
3
4int 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}
21