The test suite of the module 'system-quote' reveals that the '*' is also
special for CreateProcess on Windows and needs to be escaped, otherwise
CreateProcess may fail (at least on Windows XP).

Therefore, the 'execute' and 'spawn-pipe' modules need a fix.


2012-05-08  Bruno Haible  <br...@clisp.org>

        execute, spawn-pipe: Escape '*' characters in arguments on Windows.
        * lib/w32spawn.h (SHELL_SPECIAL_CHARS): Add the '*' character.

--- lib/w32spawn.h.orig Wed May  9 03:38:54 2012
+++ lib/w32spawn.h      Tue May  8 21:20:31 2012
@@ -115,8 +115,10 @@
        \" -> "
        \\\" -> \"
        \\\\\" -> \\"
+   - '*' characters may get expanded or lead to a failure with error code
+     ERROR_PATH_NOT_FOUND.
  */
-#define SHELL_SPECIAL_CHARS "\"\\ 
\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037"
+#define SHELL_SPECIAL_CHARS "\"\\ 
\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037*"
 #define SHELL_SPACE_CHARS " 
\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037"
 static char **
 prepare_spawn (char **argv)


Reply via email to