Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [RFC] Allow '!' in program paths
@ 2002-02-06 15:48 Klee Dienes
  2002-02-06 16:56 ` Michael Snyder
  2002-03-09 19:12 ` Andrew Cagney
  0 siblings, 2 replies; 3+ messages in thread
From: Klee Dienes @ 2002-02-06 15:48 UTC (permalink / raw)
  To: gdb-patches

2002-02-06  Klee Dienes  <klee@apple.com>

         * 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".

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);
             }


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [RFC] Allow '!' in program paths
  2002-02-06 15:48 [RFC] Allow '!' in program paths Klee Dienes
@ 2002-02-06 16:56 ` Michael Snyder
  2002-03-09 19:12 ` Andrew Cagney
  1 sibling, 0 replies; 3+ messages in thread
From: Michael Snyder @ 2002-02-06 16:56 UTC (permalink / raw)
  To: Klee Dienes; +Cc: gdb-patches

Klee Dienes wrote:
> 
> 2002-02-06  Klee Dienes  <klee@apple.com>
> 
>          * 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);
>              }


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [RFC] Allow '!' in program paths
  2002-02-06 15:48 [RFC] Allow '!' in program paths Klee Dienes
  2002-02-06 16:56 ` Michael Snyder
@ 2002-03-09 19:12 ` Andrew Cagney
  1 sibling, 0 replies; 3+ messages in thread
From: Andrew Cagney @ 2002-03-09 19:12 UTC (permalink / raw)
  To: Klee Dienes; +Cc: gdb-patches

Dig dig.  Yes, thanks (sorry for the delay).

Andrew



> 2002-02-06  Klee Dienes  <klee@apple.com>
> 
>         * 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".
> 
> 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);
>             }
> 



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2002-03-10  3:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-02-06 15:48 [RFC] Allow '!' in program paths Klee Dienes
2002-02-06 16:56 ` Michael Snyder
2002-03-09 19:12 ` Andrew Cagney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox