int main() { expected_out_open(); #ifdef HAVE_EXECV fork_fun(call_execv); expected_out("cc", "execv.c"); #endif #ifdef HAVE_EXECVE fork_fun(call_execve); expected_out("/usr/bin/cc", "execve.c"); #endif #ifdef HAVE_EXECVP fork_fun(call_execvp); expected_out("cc", "execvp.c"); #endif #ifdef HAVE_EXECVP2 fork_fun(call_execvP); expected_out("cc", "execv_p.c"); #endif #ifdef HAVE_EXECVPE fork_fun(call_execvpe); expected_out("/usr/bin/cc", "execvpe.c"); #endif #ifdef HAVE_EXECL fork_fun(call_execl); expected_out("cc", "execl.c"); #endif #ifdef HAVE_EXECLP fork_fun(call_execlp); expected_out("cc", "execlp.c"); #endif #ifdef HAVE_EXECLE fork_fun(call_execle); expected_out("/usr/bin/cc", "execle.c"); #endif #ifdef HAVE_POSIX_SPAWN call_posix_spawn(); expected_out("cc", "posix_spawn.c"); #endif #ifdef HAVE_POSIX_SPAWNP call_posix_spawnp(); expected_out("cc", "posix_spawnp.c"); #endif #ifdef HAVE_EXECLE fork_fun(call_execle_and_printenv); #endif expected_out_close(); return 0; }
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; }