[MinGW PATCH] spawnvppe_pipe: Don't overwrite argv[0]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Because caller expects it so

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@xxxxxxxxx>
---
 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
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux