diff options
author | Junio C Hamano <gitster@pobox.com> | 2010-04-11 13:54:28 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-04-11 13:54:28 -0700 |
commit | 4553d58f374c6bfcae6b4be528bbf11c18a7efe5 (patch) | |
tree | 44877f9283ffa304e6a805a56f2270fe21b892c7 /compat | |
parent | 7b575f3c387f7fd1b204af71a02b3faa74fb7798 (diff) | |
parent | f9a2743c3529baab6de650aa3e3eb96de9386fec (diff) | |
download | git-4553d58f374c6bfcae6b4be528bbf11c18a7efe5.tar.gz git-4553d58f374c6bfcae6b4be528bbf11c18a7efe5.tar.xz |
Merge branch 'jl/maint-submodule-gitfile-awareness'
* jl/maint-submodule-gitfile-awareness:
Windows: start_command: Support non-NULL dir in struct child_process
Diffstat (limited to 'compat')
-rw-r--r-- | compat/mingw.c | 10 | ||||
-rw-r--r-- | compat/mingw.h | 1 |
2 files changed, 7 insertions, 4 deletions
diff --git a/compat/mingw.c b/compat/mingw.c index 30716903f..f90a114b0 100644 --- a/compat/mingw.c +++ b/compat/mingw.c @@ -650,6 +650,7 @@ static int env_compare(const void *a, const void *b) } static pid_t mingw_spawnve_fd(const char *cmd, const char **argv, char **env, + const char *dir, int prepend_cmd, int fhin, int fhout, int fherr) { STARTUPINFO si; @@ -729,7 +730,7 @@ static pid_t mingw_spawnve_fd(const char *cmd, const char **argv, char **env, memset(&pi, 0, sizeof(pi)); ret = CreateProcess(cmd, args.buf, NULL, NULL, TRUE, flags, - env ? envblk.buf : NULL, NULL, &si, &pi); + env ? envblk.buf : NULL, dir, &si, &pi); if (env) strbuf_release(&envblk); @@ -746,10 +747,11 @@ static pid_t mingw_spawnve_fd(const char *cmd, const char **argv, char **env, static pid_t mingw_spawnve(const char *cmd, const char **argv, char **env, int prepend_cmd) { - return mingw_spawnve_fd(cmd, argv, env, prepend_cmd, 0, 1, 2); + return mingw_spawnve_fd(cmd, argv, env, NULL, prepend_cmd, 0, 1, 2); } pid_t mingw_spawnvpe(const char *cmd, const char **argv, char **env, + const char *dir, int fhin, int fhout, int fherr) { pid_t pid; @@ -772,14 +774,14 @@ pid_t mingw_spawnvpe(const char *cmd, const char **argv, char **env, pid = -1; } else { - pid = mingw_spawnve_fd(iprog, argv, env, 1, + pid = mingw_spawnve_fd(iprog, argv, env, dir, 1, fhin, fhout, fherr); free(iprog); } argv[0] = argv0; } else - pid = mingw_spawnve_fd(prog, argv, env, 0, + pid = mingw_spawnve_fd(prog, argv, env, dir, 0, fhin, fhout, fherr); free(prog); } diff --git a/compat/mingw.h b/compat/mingw.h index e81e752ed..7c2ab64cb 100644 --- a/compat/mingw.h +++ b/compat/mingw.h @@ -229,6 +229,7 @@ int mingw_utime(const char *file_name, const struct utimbuf *times); #define utime mingw_utime pid_t mingw_spawnvpe(const char *cmd, const char **argv, char **env, + const char *dir, int fhin, int fhout, int fherr); void mingw_execvp(const char *cmd, char *const *argv); #define execvp mingw_execvp |