3 #include <aros/debug.h>
11 /* Test vfork and a child doing execl() */
15 printf("I'm parent, I have a child with pid %d\n", (int) pid
);
16 waitpid(pid
, NULL
, 0);
20 execl("C:Echo", "Echo", "I'm child", NULL
);
29 /* Testing child trying to exec non-existing program */
33 printf("I'm parent, I have a child with pid %d\n", (int) pid
);
34 waitpid(pid
, NULL
, 0);
38 TEST(execl(":XYZ/NotExist", "NotExist", "I'm child", NULL
) == -1);
46 /* Testing nested vfork() + execl() */
50 printf("I'm parent, I have a first child with pid %d\n", (int) pid
);
54 printf("I'm parent, I have a second child with pid %d\n", (int) pid2
);
55 waitpid(pid2
, NULL
, 0);
59 execl("C:Echo", "Echo", "I'm the second child of a parent", NULL
);
62 waitpid(pid
, NULL
, 0);
66 //printf("I'm child of a parent\n");
70 //printf("I'm child, I have my child with pid %d\n", (int) pid2);
71 waitpid(pid2
, NULL
, 0);
75 execl("C:Echo", "Echo", "I'm child of a child", NULL
);