3 #include <aros/debug.h>
9 char *argv0
[] = { "Echo", "I'm child", NULL
};
10 char *argv1
[] = { "Echo", "I'm the second child of a parent", NULL
};
11 char *argv2
[] = { "Echo", "I'm child of a child", NULL
};
12 char *envp
[] = { NULL
};
18 printf("I'm parent, I have a child with pid %d\n", (int) pid
);
19 waitpid(pid
, NULL
, 0);
23 execve("C:Echo", argv0
, envp
);
34 printf("I'm parent, I have a first child with pid %d\n", (int) pid
);
38 printf("I'm parent, I have a second child with pid %d\n", (int) pid2
);
39 waitpid(pid2
, NULL
, 0);
43 execve("C:Echo", argv1
, envp
);
46 waitpid(pid
, NULL
, 0);
50 printf("I'm child of a parent\n");
54 printf("I'm child, I have my child with pid %d\n", (int) pid2
);
55 waitpid(pid2
, NULL
, 0);
59 execve("C:Echo", argv2
, envp
);