/* $ dcc exec.c $ a.out good-bye cruel world $ */ #include #include // simple example of program replacing itself with exec int main(void) { char *echo_argv[] = {"echo","good-bye","cruel","world",NULL}; execvp("echo", echo_argv); // if we get here there has been an error perror("execvp"); return 1; }