mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-07-10 21:50:49 +02:00
commit bash-20121221 snapshot
This commit is contained in:
@@ -984,7 +984,13 @@ bash_tilde_expand (s, assign_p)
|
||||
|
||||
old_immed = interrupt_immediately;
|
||||
old_term = terminate_immediately;
|
||||
interrupt_immediately = terminate_immediately = 1;
|
||||
/* We want to be able to interrupt tilde expansion. Ordinarily, we can just
|
||||
jump to top_level, but we don't want to run any trap commands in a signal
|
||||
handler context. We might be able to get away with just checking for
|
||||
things like SIGINT and SIGQUIT. */
|
||||
if (any_signals_trapped () < 0)
|
||||
interrupt_immediately = 1;
|
||||
terminate_immediately = 1;
|
||||
|
||||
tilde_additional_prefixes = assign_p == 0 ? (char **)0
|
||||
: (assign_p == 2 ? bash_tilde_prefixes2 : bash_tilde_prefixes);
|
||||
@@ -993,8 +999,12 @@ bash_tilde_expand (s, assign_p)
|
||||
|
||||
r = (*s == '~') ? unquoted_tilde_word (s) : 1;
|
||||
ret = r ? tilde_expand (s) : savestring (s);
|
||||
|
||||
interrupt_immediately = old_immed;
|
||||
terminate_immediately = old_term;
|
||||
|
||||
QUIT;
|
||||
|
||||
return (ret);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user