aboutsummaryrefslogtreecommitdiff
path: root/gdb/fork-child.c
diff options
context:
space:
mode:
authorKlee Dienes <kdienes@apple.com>2002-02-07 06:11:55 +0000
committerKlee Dienes <kdienes@apple.com>2002-02-07 06:11:55 +0000
commitd88499536edd3e088cfaa00dc19b4fc0a21168ad (patch)
tree77d0bc2cbd1b98dee4039e658a27bec4a7cb1bb5 /gdb/fork-child.c
parent9636f65c5e7338a0dbc4ca2e51fc538fb3f468ac (diff)
downloadgdb-d88499536edd3e088cfaa00dc19b4fc0a21168ad.zip
gdb-d88499536edd3e088cfaa00dc19b4fc0a21168ad.tar.gz
gdb-d88499536edd3e088cfaa00dc19b4fc0a21168ad.tar.bz2
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.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gdb/fork-child.c b/gdb/fork-child.c
index 21e5089..aacd53c 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);
}