| 2216 | } |
| 2217 | |
| 2218 | int mingw_execv(const char *cmd, char *const *argv) |
| 2219 | { |
| 2220 | /* check if git_command is a shell script */ |
| 2221 | if (!try_shell_exec(cmd, argv)) { |
| 2222 | int pid, status; |
| 2223 | int exec_id; |
| 2224 | |
| 2225 | exec_id = trace2_exec(cmd, (const char **)argv); |
| 2226 | pid = mingw_spawnv(cmd, (const char **)argv, 0); |
| 2227 | if (pid < 0) { |
| 2228 | trace2_exec_result(exec_id, -1); |
| 2229 | return -1; |
| 2230 | } |
| 2231 | if (waitpid(pid, &status, 0) < 0) |
| 2232 | status = 255; |
| 2233 | trace2_exec_result(exec_id, status); |
| 2234 | exit(status); |
| 2235 | } |
| 2236 | return -1; |
| 2237 | } |
| 2238 | |
| 2239 | int mingw_execvp(const char *cmd, char *const *argv) |
| 2240 | { |
no test coverage detected