emacs-devel
[Top][All Lists]
Advanced

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

Re: Using `call-process-shell-command' in `process-lines'


From: Jason Rumney
Subject: Re: Using `call-process-shell-command' in `process-lines'
Date: Mon, 26 Nov 2007 22:17:02 +0000
User-agent: Thunderbird 2.0.0.9 (Windows/20071031)

Eli Zaretskii wrote:
> Anyway, I see now that I missed something important: we already have a
> wrapper for spawnve (w32proc.c:sys_spawnve), and it already tries to
> quote arguments.

But not in the presence of wildcards, only whitespace.

The version of find that I have (4.2.20 from GnuWin32) works with the
original test case, so I can't test this (other than to verify that find
still works OK after the patch), but it seems like the following patch
might help:

*** w32proc.c.~1.73.~    2007-10-10 22:46:40.593750000 +0100
--- w32proc.c    2007-11-26 21:33:19.609375000 +0000
***************
*** 781,787 ****
       variable in their environment.  */
    char ppid_env_var_buffer[64];
    char *extra_env[] = {ppid_env_var_buffer, NULL};
!   char *sepchars = " \t";
 
    /* We don't care about the other modes */
    if (mode != _P_NOWAIT)
--- 781,787 ----
       variable in their environment.  */
    char ppid_env_var_buffer[64];
    char *extra_env[] = {ppid_env_var_buffer, NULL};
!   char *sepchars = " \t*?";
 
    /* We don't care about the other modes */
    if (mode != _P_NOWAIT)
***************
*** 882,888 ****
 
    /* Cygwin apps needs quoting a bit more often */
    if (escape_char == '"')
!     sepchars = "\r\n\t\f '";
 
    /* do argv...  */
    arglen = 0;
--- 882,888 ----
 
    /* Cygwin apps needs quoting a bit more often */
    if (escape_char == '"')
!     sepchars = "\r\n\t\f '*?";
 
    /* do argv...  */
    arglen = 0;


Diffs between working revision and workfile end here.






reply via email to

[Prev in Thread] Current Thread [Next in Thread]