3 #include <aros/debug.h>
10 int retval
= RETURN_OK
;
16 printf("I'm parent, I have a child with pid %d\n", (int) pid
);
17 waitpid(pid
, &status
, 0);
23 // Only _exit() and exec*() are valid in child context
34 printf("I'm parent, I have a first child with pid %d\n", (int) pid
);
39 printf("I'm parent, I have a second child with pid %d\n", (int) pid2
);
40 waitpid(pid2
, &status
, 0);
46 // Only _exit(), vfork(), and exec*() are valid in child context
49 waitpid(pid
, NULL
, 0);
57 // I'm child, I have my child with pid2
59 waitpid(pid2
, &status
, 0);
65 // I am the child of a child