From 18a80473ed3fd815d99e64a8e7392066125a7e3c Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Fri, 1 Feb 2013 11:23:23 +0200 Subject: [PATCH] w32proc.c (sys_spawnve): Initialize escape_char. src/w32proc.c (sys_spawnve): Make sure escape_char is initialized, even if w32-quote-process-args is nil. --- src/ChangeLog | 5 +++++ src/w32proc.c | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 0fd835747ce..e80458c172f 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2013-02-01 Eli Zaretskii + + * w32proc.c (sys_spawnve): Make sure escape_char is initialized, + even if w32-quote-process-args is nil. + 2013-01-27 Eli Zaretskii * w32.c (sys_open): Zero out the flags for the new file descriptor. diff --git a/src/w32proc.c b/src/w32proc.c index 3201fa9397e..8c09a1b1beb 100644 --- a/src/w32proc.c +++ b/src/w32proc.c @@ -1431,7 +1431,6 @@ sys_spawnve (int mode, char *cmdname, char **argv, char **envp) child_process *cp; int is_dos_app, is_cygnus_app, is_gui_app; int do_quoting = 0; - char escape_char; /* We pass our process ID to our children by setting up an environment variable in their environment. */ char ppid_env_var_buffer[64]; @@ -1444,6 +1443,8 @@ sys_spawnve (int mode, char *cmdname, char **argv, char **envp) Some extra whitespace characters need quoting in Cygwin programs, so this list is conditionally modified below. */ char *sepchars = " \t*?"; + /* This is for native w32 apps; modified below for Cygwin apps. */ + char escape_char = '\\'; /* We don't care about the other modes */ if (mode != _P_NOWAIT) -- 2.39.2