Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Date: Mon, 20 Nov 2000 21:22:39 +0100 From: Pierre Bogossian To: cygwin AT cygwin DOT com Subject: Re: [PATCH] Fix for backslash quoting in argument list passing (spawn_guts) Message-ID: <20001120212239.A79433@free.bsdshell.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i >I've included what I think is a much simpler patch below. It seems to >work correctly using a vc compiled program which echos its args. The problem with your patch is that it can double backslashes even if they don't precede a '"', and that shouldn't be done ! Here is what I get with your patch: /tmp $ ./print_args_cygwin.exe 'a a\\a' 1: a a\\a /tmp $ ./print_args_nocygwin.exe 'a a\\a' 1: a a\\\\a Another issue is that backslashes that are just before the closing '"' have to be doubled too: /tmp $ ./print_args_cygwin.exe 'a a\' 1: a a\ /tmp $ ./print_args_nocygwin.exe 'a a\' 1: a a" My print_args_nocygwin.exe is compiled with gcc, but I guess the result is the same with vc. Pierre Bogossian -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com