-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbash-5.2-patch-29.patch
More file actions
87 lines (81 loc) · 2.4 KB
/
bash-5.2-patch-29.patch
File metadata and controls
87 lines (81 loc) · 2.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
diff --git a/parse.y b/parse.y
--- a/parse.y
+++ b/parse.y
@@ -6470,10 +6470,15 @@ parse_string_to_word_list (s, flags, whom)
if (wl == &parse_string_error)
{
set_exit_status (EXECUTION_FAILURE);
+ current_token = '\n'; /* XXX */
if (interactive_shell == 0 && posixly_correct)
jump_to_top_level (FORCE_EOF);
else
- jump_to_top_level (DISCARD);
+ {
+ if (executing && parse_and_execute_level == 0)
+ top_level_cleanup ();
+ jump_to_top_level (DISCARD);
+ }
}
return (REVERSE_LIST (wl, WORD_LIST *));
@@ -6537,11 +6542,15 @@ parse_compound_assignment (retlenp)
if (wl == &parse_string_error)
{
set_exit_status (EXECUTION_FAILURE);
- last_read_token = '\n'; /* XXX */
+ last_read_token = current_token = '\n'; /* XXX */
if (interactive_shell == 0 && posixly_correct)
jump_to_top_level (FORCE_EOF);
else
- jump_to_top_level (DISCARD);
+ {
+ if (executing && parse_and_execute_level == 0)
+ top_level_cleanup ();
+ jump_to_top_level (DISCARD);
+ }
}
if (wl)
diff --git a/patchlevel.h b/patchlevel.h
--- a/patchlevel.h
+++ b/patchlevel.h
@@ -25,6 +25,6 @@
regexp `^#define[ ]*PATCHLEVEL', since that's what support/mkversion.sh
looks for to find the patch level (for the sccs version string). */
-#define PATCHLEVEL 28
+#define PATCHLEVEL 29
#endif /* _PATCHLEVEL_H_ */
diff --git a/y.tab.c b/y.tab.c
--- a/y.tab.c
+++ b/y.tab.c
@@ -8785,10 +8785,15 @@ parse_string_to_word_list (s, flags, whom)
if (wl == &parse_string_error)
{
set_exit_status (EXECUTION_FAILURE);
+ current_token = '\n'; /* XXX */
if (interactive_shell == 0 && posixly_correct)
jump_to_top_level (FORCE_EOF);
else
- jump_to_top_level (DISCARD);
+ {
+ if (executing && parse_and_execute_level == 0)
+ top_level_cleanup ();
+ jump_to_top_level (DISCARD);
+ }
}
return (REVERSE_LIST (wl, WORD_LIST *));
@@ -8852,11 +8857,15 @@ parse_compound_assignment (retlenp)
if (wl == &parse_string_error)
{
set_exit_status (EXECUTION_FAILURE);
- last_read_token = '\n'; /* XXX */
+ last_read_token = current_token = '\n'; /* XXX */
if (interactive_shell == 0 && posixly_correct)
jump_to_top_level (FORCE_EOF);
else
- jump_to_top_level (DISCARD);
+ {
+ if (executing && parse_and_execute_level == 0)
+ top_level_cleanup ();
+ jump_to_top_level (DISCARD);
+ }
}
if (wl)