unconditionally define PGRP_PIPE; fix wait in funsubs; fix REPLY as nameref in varsub; fix crash with parse errors in compound assignments

This commit is contained in:
Chet Ramey
2024-01-14 15:38:36 -05:00
parent 584a2b4c9e
commit f2fdb5e313
14 changed files with 125 additions and 154 deletions
+15 -11
View File
@@ -6995,21 +6995,11 @@ parse_compound_assignment (size_t *retlenp)
wl = make_word_list (yylval.word, wl);
}
/* Check whether or not an alias got popped out from underneath us and
fix up after restore_parser_state. */
if (ea && ss && ss != pushed_string_list)
{
restore_pushed_strings = 1;
ss = pushed_string_list;
}
restore_parser_state (&ps);
if (restore_pushed_strings)
pushed_string_list = ss;
if (wl == &parse_string_error)
{
set_exit_status (EXECUTION_FAILURE);
last_read_token = current_token = '\n'; /* XXX */
/* This will eventually call reset_parser */
if (interactive_shell == 0 && posixly_correct)
jump_to_top_level (FORCE_EOF);
else
@@ -7020,6 +7010,20 @@ parse_compound_assignment (size_t *retlenp)
}
}
/* Check whether or not an alias got popped out from underneath us and
fix up after restore_parser_state. */
if (ea && ss && ss != pushed_string_list)
{
restore_pushed_strings = 1;
ss = pushed_string_list;
/* Don't bother with restoring the pushed string list from ps if we're
just going to overwrite it. */
ps.pushed_strings = NULL;
}
restore_parser_state (&ps);
if (restore_pushed_strings)
pushed_string_list = ss;
if (wl)
{
rl = REVERSE_LIST (wl, WORD_LIST *);