#include #include #include int main(int argc, char **argv) { printf("Parent %d, sleeping for 10s, then execing /bin/ls -l.\n",getpid()); sleep(10); if (execl("/bin/ls", "/bin/ls", "-l", NULL) != 0) { fprintf(stderr,"Couldn't exec /bin/ls -l\n"); exit(1); } exit(0); }