int execlp(const char *file, const char *arg, ...) { va_list args; va_start(args, arg); char const **argv = bear_strings_build(arg, &args); va_end(args); bear_report_call(__func__, (char const *const *)argv); int const result = call_execvp(file, (char *const *)argv); bear_strings_release(argv); return result; }
int main(int argc, char *const argv[]) { if (argc != 2) exit(EXIT_FAILURE); expected_out_open(argv[1]); #ifdef HAVE_EXECV call_execv(); #endif #ifdef HAVE_EXECVE call_execve(); #endif #ifdef HAVE_EXECVP call_execvp(); #endif #ifdef HAVE_EXECVP2 call_execvP(); #endif #ifdef HAVE_EXECVPE call_execvpe(); #endif #ifdef HAVE_EXECL call_execl(); #endif #ifdef HAVE_EXECLP call_execlp(); #endif #ifdef HAVE_EXECLE call_execle(); #endif #ifdef HAVE_POSIX_SPAWN call_posix_spawn(); #endif #ifdef HAVE_POSIX_SPAWNP call_posix_spawnp(); #endif expected_out_close(); return 0; }
int execvp(const char *file, char *const argv[]) { bear_report_call(__func__, (char const *const *)argv); return call_execvp(file, argv); }