All of lore.kernel.org
 help / color / mirror / Atom feed
* [MinGW PATCH] spawnvppe_pipe: Don't overwrite argv[0]
@ 2007-10-27 13:26 Nguyễn Thái Ngọc Duy
  0 siblings, 0 replies; only message in thread
From: Nguyễn Thái Ngọc Duy @ 2007-10-27 13:26 UTC (permalink / raw)
  To: git, Johannes Sixt

Because caller expects it so

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
---
 spawn-pipe.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/spawn-pipe.c b/spawn-pipe.c
index c8f0452..3df7e22 100644
--- a/spawn-pipe.c
+++ b/spawn-pipe.c
@@ -123,6 +123,7 @@ int spawnvppe_pipe(const char *cmd, const char **argv, const char **env,
 		  int pin[], int pout[])
 {
 	const char *cmd_basename = strrchr(cmd, '/');
+	const char *argv0 = argv[0];
 	pid_t pid;
 
 #ifdef __MINGW32__
@@ -214,6 +215,8 @@ int spawnvppe_pipe(const char *cmd, const char **argv, const char **env,
 	}
 #endif
 
+	argv[0] = argv0;
+
 	return pid;
 }
 
-- 
1.5.3.rc4.3.gab089

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2007-10-27 13:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-27 13:26 [MinGW PATCH] spawnvppe_pipe: Don't overwrite argv[0] Nguyễn Thái Ngọc Duy

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.