From d88499536edd3e088cfaa00dc19b4fc0a21168ad Mon Sep 17 00:00:00 2001 From: Klee Dienes Date: Thu, 7 Feb 2002 06:11:55 +0000 Subject: [PATCH] 2002-02-07 Klee Dienes * 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". --- gdb/ChangeLog | 7 +++++++ gdb/fork-child.c | 3 +++ 2 files changed, 10 insertions(+) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index fd70107d79..9083fbf55c 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,10 @@ +2002-02-07 Klee Dienes + + * 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 * 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 21e508939b..aacd53cac7 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); } -- 2.34.1