2 Copyright © 1995-2014, The AROS Development Team. All rights reserved.
9 #include <aros/debug.h>
12 #define EXIT_STATUS 123
16 char *argv0
[] = { "Echo", "I'm child", NULL
};
17 char *envp
[] = { NULL
};
25 printf("I'm parent, I have a child with pid %d\n", (int) pid
);
26 printf("Waiting for child to exit.\n");
27 wait_pid
= wait(&status
);
28 TEST((wait_pid
== pid
));
29 printf("Child %d exited with exit status %d\n", (int) wait_pid
, status
);
30 TEST((status
== EXIT_STATUS
));
34 printf("Exiting with status %d\n", EXIT_STATUS
);
45 printf("I'm parent, I have a child with pid %d\n", (int) pid
);
46 printf("Waiting for child to exit.\n");
47 wait_pid
= wait(&status
);
48 TEST((wait_pid
== pid
));
49 printf("Child %d exited with exit status %d\n", (int) wait_pid
, status
);
54 execve("C:Echo", argv0
, envp
);