#include #include #include #include int main() { printf("exec3 is starting to execute.\n" ) ; pid_t pid; switch( pid = fork() ) { case -1: printf("fork failed"); break; case 0: //Child printf("\n In the child process. About to run exec1"); fflush(stdout); char *args[] = { "./exec1" , NULL } ; execv( "./exec1" , args ) ; break; default: //parent printf("exec3 is ending.\n" ) ; fflush(stdout); } return 0; }