From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21627 invoked by alias); 7 Feb 2002 00:56:47 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 21449 invoked from network); 7 Feb 2002 00:56:43 -0000 Received: from unknown (HELO cygnus.com) (205.180.230.5) by sources.redhat.com with SMTP; 7 Feb 2002 00:56:43 -0000 Received: from redhat.com (notinuse.cygnus.com [205.180.231.12]) by runyon.cygnus.com (8.8.7-cygnus/8.8.7) with ESMTP id QAA10006; Wed, 6 Feb 2002 16:56:37 -0800 (PST) Message-ID: <3C61CF14.B33024AC@redhat.com> Date: Wed, 06 Feb 2002 16:56:00 -0000 From: Michael Snyder Organization: Red Hat, Inc. X-Mailer: Mozilla 4.76 [en] (X11; U; Linux 2.4.2-2smp i686) X-Accept-Language: en MIME-Version: 1.0 To: Klee Dienes CC: gdb-patches@sources.redhat.com Subject: Re: [RFC] Allow '!' in program paths References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-SW-Source: 2002-02/txt/msg00191.txt.bz2 Klee Dienes wrote: > > 2002-02-06 Klee Dienes > > * fork-inferior.c (fork_inferior): Add '!' to the list of > characters that need to be quoted when building a string for the > shell. Quote '!' specifically with a backslash, since CSH chokes > when trying to evaluate "str!str". Seems sane to me. Wanna check it in? > > Index: fork-child.c > =================================================================== > RCS file: /cvs/Darwin/Commands/GNU/cygnus/src/gdb/fork-child.c,v > retrieving revision 1.9 > diff -u -r1.9 fork-child.c > --- fork-child.c 2001/11/29 00:18:44 1.9 > +++ fork-child.c 2002/02/06 22:53:11 > @@ -204,6 +204,7 @@ > switch (*p) > { > case '\'': > + case '!': > case '"': > case '(': > case ')': > @@ -235,6 +236,8 @@ > { > if (*p == '\'') > strcat (shell_command, "'\\''"); > + else if (*p == '!') > + strcat (shell_command, "\\!"); > else > strncat (shell_command, p, 1); > }