diff options
author | Klee Dienes <kdienes@apple.com> | 2002-02-07 06:11:55 +0000 |
---|---|---|
committer | Klee Dienes <kdienes@apple.com> | 2002-02-07 06:11:55 +0000 |
commit | 21c0d3f8cd2d9e7dd1bb98503e40e4e675d27c05 (patch) | |
tree | f8b16d876670524bf5413bf083c3ffa45c3e200b | |
parent | 5de4b2db74fb8727a303324809d62c863167620c (diff) | |
download | gdb-21c0d3f8cd2d9e7dd1bb98503e40e4e675d27c05.tar.gz |
2002-02-07 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".
-rw-r--r-- | gdb/ChangeLog | 7 | ||||
-rw-r--r-- | gdb/fork-child.c | 3 |
2 files changed, 10 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index fd70107d797..9083fbf55ca 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,10 @@ +2002-02-07 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". + 2002-02-06 Nick Clifton <nickc@cambridge.redhat.com> * rdi-share/host.h: Only provide a typedef for bool if it is not diff --git a/gdb/fork-child.c b/gdb/fork-child.c index 21e508939b6..aacd53cac71 100644 --- a/gdb/fork-child.c +++ b/gdb/fork-child.c @@ -183,6 +183,7 @@ fork_inferior (char *exec_file_arg, char *allargs, char **env, switch (*p) { case '\'': + case '!': case '"': case '(': case ')': @@ -214,6 +215,8 @@ fork_inferior (char *exec_file_arg, char *allargs, char **env, { if (*p == '\'') strcat (shell_command, "'\\''"); + else if (*p == '!') + strcat (shell_command, "\\!"); else strncat (shell_command, p, 1); } |