aboutsummaryrefslogtreecommitdiff
path: root/compat/mingw.h
diff options
context:
space:
mode:
authorJohannes Sixt <johannes.sixt@telecom.at>2007-11-24 22:49:16 +0100
committerJohannes Sixt <johannes.sixt@telecom.at>2008-06-26 08:45:10 +0200
commit7e5d776854e858ae69a4cde9db8de6675ffb5de6 (patch)
tree61bf14b4834fc26b869dc83c73dd509cfd43c14c /compat/mingw.h
parent746fb8574459798d127e3f9cf782ccb8e31c9e45 (diff)
downloadgit-7e5d776854e858ae69a4cde9db8de6675ffb5de6.tar.gz
git-7e5d776854e858ae69a4cde9db8de6675ffb5de6.tar.xz
Windows: Implement a custom spawnve().
The problem with Windows's own implementation is that it tries to be clever when a console program is invoked from a GUI application: In this case it sometimes automatically allocates a new console window. As a consequence, the IO channels of the spawned program are directed to the console, but the invoking application listens on channels that are now directed to nowhere. In this implementation we use the lowlevel facilities of CreateProcess(), which offers a flag to tell the system not to open a console. As a side effect, only stdin, stdout, and stderr channels will be accessible from C programs that are spawned. Other channels (file handles, pipe handles, etc.) are still inherited by the spawned program, but it doesn't get enough information to access them. Johannes Schindelin integrated path quoting and unified the various *execv* and *spawnv* helpers. Eric Raible suggested to also quote '{'. Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
Diffstat (limited to 'compat/mingw.h')
-rw-r--r--compat/mingw.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/compat/mingw.h b/compat/mingw.h
index 1017632a2..48229d538 100644
--- a/compat/mingw.h
+++ b/compat/mingw.h
@@ -160,6 +160,7 @@ int mingw_connect(int sockfd, struct sockaddr *sa, size_t sz);
int mingw_rename(const char*, const char*);
#define rename mingw_rename
+pid_t mingw_spawnvpe(const char *cmd, const char **argv, char **env);
void mingw_execvp(const char *cmd, char *const *argv);
#define execvp mingw_execvp