From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4906 invoked by alias); 3 May 2003 08:39:30 -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 4897 invoked from network); 3 May 2003 08:39:28 -0000 Received: from unknown (HELO gandalf.inter.net.il) (192.114.186.22) by sources.redhat.com with SMTP; 3 May 2003 08:39:28 -0000 Received: from zaretsky (cable-128-43.inter.net.il [213.8.128.43]) by gandalf.inter.net.il (Mirapoint Messaging Server MOS 3.2.2-GA) with ESMTP id ANO05579; Sat, 3 May 2003 11:39:11 +0300 (IDT) Date: Sat, 03 May 2003 08:39:00 -0000 From: "Eli Zaretskii" To: brobecker@gnat.com Message-Id: <1438-Sat03May2003113601+0300-eliz@elta.co.il> CC: gdb-patches@sources.redhat.com In-reply-to: <20030502233458.GP992@gnat.com> (message from Joel Brobecker on Fri, 2 May 2003 16:34:58 -0700) Subject: Re: [RFA/RFC] Problem with '!' escaping with zsh/bash/ksh Reply-to: Eli Zaretskii References: <20030502233458.GP992@gnat.com> X-SW-Source: 2003-05/txt/msg00026.txt.bz2 > Date: Fri, 2 May 2003 16:34:58 -0700 > From: Joel Brobecker > > the following change introduced a problem when forking inferiors when > the path to the executable contains '!' characters. This only occurs > with sh-like shells, like zsh/bash/ksh. I have reproduced this on Linux > and HP/UX. > > * 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". > > Witness: > > (gdb) run > Starting program: /home/brobecke/tmp/GEO_ENV!9.159/foo > zsh: no such file or directory: /home/brobecke/tmp/GEO_ENV\!9.159/foo > > Program exited with code 01. > You can't do that without a process to debug. > > As far as I can tell from the comments in fork_inferior and my own > experiments, the bang should be escaped only for C shells. Are you saying that zsh doesn't support escaping of arbitrary characters with a backslash? That is, under zsh, "\a" is not the same as "a"? I'd be surprised.