author | Johannes Sixt <johannes.sixt@telecom.at> | |
Fri, 7 Dec 2007 21:08:59 +0000 (22:08 +0100) | ||
committer | Johannes Sixt <johannes.sixt@telecom.at> | |
Mon, 23 Jun 2008 11:40:31 +0000 (13:40 +0200) | ||
commit | ba26f296f9ddc694fc42683132bc328dffd777ec | |
tree | 203758fc03abfaaa7f873ed12055d7d4187021df | tree | snapshot |
parent | 897bb8cb2c2ce6b73038bd8d4106fde079a09cf6 | commit | diff |
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>
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>
compat/mingw.c | diff | blob | history | |
compat/mingw.h | diff | blob | history | |
run-command.c | diff | blob | history |