aboutsummaryrefslogtreecommitdiff
path: root/compat/mingw.h
diff options
context:
space:
mode:
authorJohannes Sixt <johannes.sixt@telecom.at>2007-12-07 22:08:59 +0100
committerJohannes Sixt <johannes.sixt@telecom.at>2008-06-23 13:40:31 +0200
commitba26f296f9ddc694fc42683132bc328dffd777ec (patch)
tree203758fc03abfaaa7f873ed12055d7d4187021df /compat/mingw.h
parent897bb8cb2c2ce6b73038bd8d4106fde079a09cf6 (diff)
downloadgit-ba26f296f9ddc694fc42683132bc328dffd777ec.tar.gz
git-ba26f296f9ddc694fc42683132bc328dffd777ec.tar.xz
Windows: Implement start_command().
On Windows, we have spawnv() variants to run a child process instead of fork()/exec(). In order to attach pipe ends to stdin, stdout, and stderr, we have to use this idiom: save1 = dup(1); dup2(pipe[1], 1); spawnv(); dup2(save1, 1); close(pipe[1]); assuming that the descriptors created by pipe() are not inheritable. Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
Diffstat (limited to 'compat/mingw.h')
-rw-r--r--compat/mingw.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/compat/mingw.h b/compat/mingw.h
index 0ce9c96f9..0879894c6 100644
--- a/compat/mingw.h
+++ b/compat/mingw.h
@@ -165,3 +165,11 @@ sig_handler_t mingw_signal(int sig, sig_handler_t handler);
#define is_dir_sep(c) ((c) == '/' || (c) == '\\')
#define PATH_SEP ';'
#define PRIuMAX "I64u"
+
+/*
+ * helpers
+ */
+
+char **copy_environ(void);
+void free_environ(char **env);
+char **env_setenv(char **env, const char *name);