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".
This commit is contained in:
parent
9636f65c5e
commit
d88499536e
@ -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
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user