/*-------------------------------------------------------------------*/ /* textexec.c */ /* The exec system call. */ /*-------------------------------------------------------------------*/ #include #include int main(int argc, char *argv[]) { char *ppcArgv[2]; printf("Executing testexec.\n"); ppcArgv[0] = "hello"; ppcArgv[1] = NULL; execvp(ppcArgv[0], ppcArgv); printf("Failed to execute execvp.\n"); /* Should never reach. */ return 1; /* Should never reach. */ } /* Sample execution: $ testexec Executing testexec. Hello world. $ */