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 /gdb/fork-child.c | |
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".
Diffstat (limited to 'gdb/fork-child.c')
-rw-r--r-- | gdb/fork-child.c | 3 |
1 files changed, 3 insertions, 0 deletions
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); } |