4 #include <aros/debug.h>
7 #define EXIT_STATUS 123
11 char *argv0
[] = { "Echo", "I'm child", NULL
};
12 char *envp
[] = { NULL
};
20 printf("I'm parent, I have a child with pid %d\n", (int) pid
);
21 printf("Waiting for child to exit.\n");
22 wait_pid
= wait(&status
);
23 TEST((wait_pid
== pid
));
24 printf("Child %d exited with exit status %d\n", (int) wait_pid
, status
);
25 TEST((status
== EXIT_STATUS
));
29 printf("Exiting with status %d\n", EXIT_STATUS
);
40 printf("I'm parent, I have a child with pid %d\n", (int) pid
);
41 printf("Waiting for child to exit.\n");
42 wait_pid
= wait(&status
);
43 TEST((wait_pid
== pid
));
44 printf("Child %d exited with exit status %d\n", (int) wait_pid
, status
);
49 execve("C:Echo", argv0
, envp
);