Update bash to 5.1.8
This commit is contained in:
parent
f828d14ed7
commit
81a51e4dc5
@ -1,68 +0,0 @@
|
||||
From f1e1163b3ef665dc26f26e0403c58153a65ee521 Mon Sep 17 00:00:00 2001
|
||||
From: Chet Ramey <chet.ramey@case.edu>
|
||||
Date: Sat, 19 Dec 2020 14:27:08 -0500
|
||||
Subject: [PATCH] Bash-5.1 patch 1: add dependency to Makefile to fix highly
|
||||
parallel builds
|
||||
|
||||
---
|
||||
Makefile.in | 2 ++
|
||||
builtins/Makefile.in | 2 +-
|
||||
patchlevel.h | 4 ++--
|
||||
3 files changed, 5 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/Makefile.in b/Makefile.in
|
||||
index bc970496..3e3a5d48 100644
|
||||
--- a/Makefile.in
|
||||
+++ b/Makefile.in
|
||||
@@ -1315,6 +1315,7 @@ bashline.o: trap.h flags.h assoc.h $(BASHINCDIR)/ocache.h
|
||||
bashline.o: $(DEFSRC)/common.h $(GLOB_LIBSRC)/glob.h alias.h
|
||||
bashline.o: pcomplete.h ${BASHINCDIR}/chartypes.h input.h
|
||||
bashline.o: ${BASHINCDIR}/shmbutil.h ${BASHINCDIR}/shmbchar.h
|
||||
+bashline.o: ${DEFDIR}/builtext.h
|
||||
bracecomp.o: config.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h
|
||||
bracecomp.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h
|
||||
bracecomp.o: command.h ${BASHINCDIR}/stdc.h error.h
|
||||
@@ -1435,6 +1436,7 @@ builtins/evalstring.o: quit.h unwind_prot.h ${BASHINCDIR}/maxpath.h jobs.h built
|
||||
builtins/evalstring.o: dispose_cmd.h make_cmd.h subst.h externs.h
|
||||
builtins/evalstring.o: jobs.h builtins.h flags.h input.h execute_cmd.h
|
||||
builtins/evalstring.o: bashhist.h $(DEFSRC)/common.h pathnames.h
|
||||
+builtins/evalstring.o: ${DEFDIR}/builtext.h
|
||||
builtins/getopt.o: config.h ${BASHINCDIR}/memalloc.h
|
||||
builtins/getopt.o: shell.h syntax.h bashjmp.h command.h general.h xmalloc.h error.h
|
||||
builtins/getopt.o: variables.h arrayfunc.h conftypes.h quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h
|
||||
diff --git a/builtins/Makefile.in b/builtins/Makefile.in
|
||||
index 3f44f05e..b349e93c 100644
|
||||
--- a/builtins/Makefile.in
|
||||
+++ b/builtins/Makefile.in
|
||||
@@ -361,7 +361,7 @@ evalstring.o: $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h $(topdir)/subst.h
|
||||
evalstring.o: $(topdir)/externs.h $(topdir)/jobs.h $(topdir)/builtins.h
|
||||
evalstring.o: $(topdir)/flags.h $(topdir)/input.h $(topdir)/execute_cmd.h
|
||||
evalstring.o: $(topdir)/bashhist.h $(srcdir)/common.h
|
||||
-evalstring.o: $(topdir)/trap.h $(topdir)/redir.h ../pathnames.h
|
||||
+evalstring.o: $(topdir)/trap.h $(topdir)/redir.h ../pathnames.h ./builtext.h
|
||||
#evalstring.o: $(topdir)/y.tab.h
|
||||
getopt.o: ../config.h $(BASHINCDIR)/memalloc.h
|
||||
getopt.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/bashjmp.h $(topdir)/command.h
|
||||
diff --git a/patchlevel.h b/patchlevel.h
|
||||
index 1cd7c96c..d5b8c5af 100644
|
||||
--- a/patchlevel.h
|
||||
+++ b/patchlevel.h
|
||||
@@ -1,6 +1,6 @@
|
||||
/* patchlevel.h -- current bash patch level */
|
||||
|
||||
-/* Copyright (C) 2001-2016 Free Software Foundation, Inc.
|
||||
+/* Copyright (C) 2001-2020 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Bash, the Bourne Again SHell.
|
||||
|
||||
@@ -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 0
|
||||
+#define PATCHLEVEL 1
|
||||
|
||||
#endif /* _PATCHLEVEL_H_ */
|
||||
--
|
||||
2.27.0
|
||||
|
||||
@ -1,45 +0,0 @@
|
||||
From ba970fdb2dcc627f2952d0bd3421abdcd9e8b85e Mon Sep 17 00:00:00 2001
|
||||
From: Chet Ramey <chet.ramey@case.edu>
|
||||
Date: Sat, 19 Dec 2020 14:27:54 -0500
|
||||
Subject: [PATCH] Bash-5.1 patch 2: fix wait -n -p var with no jobs not leaving
|
||||
var unset
|
||||
|
||||
---
|
||||
builtins/wait.def | 6 +++---
|
||||
patchlevel.h | 2 +-
|
||||
2 files changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/builtins/wait.def b/builtins/wait.def
|
||||
index 12260737..824c83fe 100644
|
||||
--- a/builtins/wait.def
|
||||
+++ b/builtins/wait.def
|
||||
@@ -213,11 +213,11 @@ wait_builtin (list)
|
||||
}
|
||||
|
||||
status = wait_for_any_job (wflags, &pstat);
|
||||
- if (status < 0)
|
||||
- status = 127;
|
||||
-
|
||||
if (vname && status >= 0)
|
||||
bind_var_to_int (vname, pstat.pid);
|
||||
+
|
||||
+ if (status < 0)
|
||||
+ status = 127;
|
||||
if (list)
|
||||
unset_waitlist ();
|
||||
WAIT_RETURN (status);
|
||||
diff --git a/patchlevel.h b/patchlevel.h
|
||||
index d5b8c5af..8a183551 100644
|
||||
--- 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 1
|
||||
+#define PATCHLEVEL 2
|
||||
|
||||
#endif /* _PATCHLEVEL_H_ */
|
||||
--
|
||||
2.27.0
|
||||
|
||||
@ -1,43 +0,0 @@
|
||||
From a042c731eecd6c6f5c488fa3187af28b18a6c905 Mon Sep 17 00:00:00 2001
|
||||
From: Chet Ramey <chet.ramey@case.edu>
|
||||
Date: Sat, 19 Dec 2020 14:29:01 -0500
|
||||
Subject: [PATCH] Bash-5.1 patch 3: fix command substitution in here-document
|
||||
from child process in wrong process group
|
||||
|
||||
---
|
||||
patchlevel.h | 2 +-
|
||||
subst.c | 6 ++++--
|
||||
2 files changed, 5 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/patchlevel.h b/patchlevel.h
|
||||
index 8a183551..e4d85cf8 100644
|
||||
--- 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 2
|
||||
+#define PATCHLEVEL 3
|
||||
|
||||
#endif /* _PATCHLEVEL_H_ */
|
||||
diff --git a/subst.c b/subst.c
|
||||
index 9ccbf336..23f847f4 100644
|
||||
--- a/subst.c
|
||||
+++ b/subst.c
|
||||
@@ -6356,8 +6356,10 @@ command_substitute (string, quoted, flags)
|
||||
|
||||
#if defined (JOB_CONTROL)
|
||||
old_pipeline_pgrp = pipeline_pgrp;
|
||||
- /* Don't reset the pipeline pgrp if we're already a subshell in a pipeline. */
|
||||
- if ((subshell_environment & SUBSHELL_PIPE) == 0)
|
||||
+ /* Don't reset the pipeline pgrp if we're already a subshell in a pipeline or
|
||||
+ we've already forked to run a disk command (and are expanding redirections,
|
||||
+ for example). */
|
||||
+ if ((subshell_environment & (SUBSHELL_FORK|SUBSHELL_PIPE)) == 0)
|
||||
pipeline_pgrp = shell_pgrp;
|
||||
cleanup_the_pipeline ();
|
||||
#endif /* JOB_CONTROL */
|
||||
--
|
||||
2.27.0
|
||||
|
||||
@ -1,117 +0,0 @@
|
||||
From 76404c85d492c001f59f2644074333ffb7608532 Mon Sep 17 00:00:00 2001
|
||||
From: Chet Ramey <chet.ramey@case.edu>
|
||||
Date: Sat, 19 Dec 2020 14:30:13 -0500
|
||||
Subject: [PATCH] Bash-5.1 patch 4: fix key-value pair associative array
|
||||
assignment word expansions
|
||||
|
||||
---
|
||||
arrayfunc.c | 23 ++++++++++++++++++++++-
|
||||
arrayfunc.h | 3 +++
|
||||
patchlevel.h | 2 +-
|
||||
subst.c | 11 +++++++++++
|
||||
4 files changed, 37 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/arrayfunc.c b/arrayfunc.c
|
||||
index 2f8a3848..8231ba1e 100644
|
||||
--- a/arrayfunc.c
|
||||
+++ b/arrayfunc.c
|
||||
@@ -597,6 +597,27 @@ assign_assoc_from_kvlist (var, nlist, h, flags)
|
||||
free (aval);
|
||||
}
|
||||
}
|
||||
+
|
||||
+/* Return non-zero if L appears to be a key-value pair associative array
|
||||
+ compound assignment. */
|
||||
+int
|
||||
+kvpair_assignment_p (l)
|
||||
+ WORD_LIST *l;
|
||||
+{
|
||||
+ return (l && (l->word->flags & W_ASSIGNMENT) == 0 && l->word->word[0] != '['); /*]*/
|
||||
+}
|
||||
+
|
||||
+char *
|
||||
+expand_and_quote_kvpair_word (w)
|
||||
+ char *w;
|
||||
+{
|
||||
+ char *t, *r;
|
||||
+
|
||||
+ t = w ? expand_assignment_string_to_string (w, 0) : 0;
|
||||
+ r = sh_single_quote (t ? t : "");
|
||||
+ free (t);
|
||||
+ return r;
|
||||
+}
|
||||
#endif
|
||||
|
||||
/* Callers ensure that VAR is not NULL. Associative array assignments have not
|
||||
@@ -640,7 +661,7 @@ assign_compound_array_list (var, nlist, flags)
|
||||
last_ind = (a && (flags & ASS_APPEND)) ? array_max_index (a) + 1 : 0;
|
||||
|
||||
#if ASSOC_KVPAIR_ASSIGNMENT
|
||||
- if (assoc_p (var) && nlist && (nlist->word->flags & W_ASSIGNMENT) == 0 && nlist->word->word[0] != '[') /*]*/
|
||||
+ if (assoc_p (var) && kvpair_assignment_p (nlist))
|
||||
{
|
||||
iflags = flags & ~ASS_APPEND;
|
||||
assign_assoc_from_kvlist (var, nlist, nhash, iflags);
|
||||
diff --git a/arrayfunc.h b/arrayfunc.h
|
||||
index c2bbb98a..838e76d2 100644
|
||||
--- a/arrayfunc.h
|
||||
+++ b/arrayfunc.h
|
||||
@@ -67,6 +67,9 @@ extern SHELL_VAR *assign_array_var_from_string PARAMS((SHELL_VAR *, char *, int)
|
||||
extern char *expand_and_quote_assoc_word PARAMS((char *, int));
|
||||
extern void quote_compound_array_list PARAMS((WORD_LIST *, int));
|
||||
|
||||
+extern int kvpair_assignment_p PARAMS((WORD_LIST *));
|
||||
+extern char *expand_and_quote_kvpair_word PARAMS((char *));
|
||||
+
|
||||
extern int unbind_array_element PARAMS((SHELL_VAR *, char *, int));
|
||||
extern int skipsubscript PARAMS((const char *, int, int));
|
||||
|
||||
diff --git a/patchlevel.h b/patchlevel.h
|
||||
index e4d85cf8..e1429c24 100644
|
||||
--- 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 3
|
||||
+#define PATCHLEVEL 4
|
||||
|
||||
#endif /* _PATCHLEVEL_H_ */
|
||||
diff --git a/subst.c b/subst.c
|
||||
index 23f847f4..6132316a 100644
|
||||
--- a/subst.c
|
||||
+++ b/subst.c
|
||||
@@ -11604,6 +11604,7 @@ expand_oneword (value, flags)
|
||||
{
|
||||
WORD_LIST *l, *nl;
|
||||
char *t;
|
||||
+ int kvpair;
|
||||
|
||||
if (flags == 0)
|
||||
{
|
||||
@@ -11618,11 +11619,21 @@ expand_oneword (value, flags)
|
||||
{
|
||||
/* Associative array */
|
||||
l = parse_string_to_word_list (value, 1, "array assign");
|
||||
+#if ASSOC_KVPAIR_ASSIGNMENT
|
||||
+ kvpair = kvpair_assignment_p (l);
|
||||
+#endif
|
||||
+
|
||||
/* For associative arrays, with their arbitrary subscripts, we have to
|
||||
expand and quote in one step so we don't have to search for the
|
||||
closing right bracket more than once. */
|
||||
for (nl = l; nl; nl = nl->next)
|
||||
{
|
||||
+#if ASSOC_KVPAIR_ASSIGNMENT
|
||||
+ if (kvpair)
|
||||
+ /* keys and values undergo the same set of expansions */
|
||||
+ t = expand_and_quote_kvpair_word (nl->word->word);
|
||||
+ else
|
||||
+#endif
|
||||
if ((nl->word->flags & W_ASSIGNMENT) == 0)
|
||||
t = sh_single_quote (nl->word->word ? nl->word->word : "");
|
||||
else
|
||||
--
|
||||
2.27.0
|
||||
|
||||
@ -1,85 +0,0 @@
|
||||
From cc978a670597afc3251baca3a7db553f36946c22 Mon Sep 17 00:00:00 2001
|
||||
From: Chet Ramey <chet.ramey@case.edu>
|
||||
Date: Tue, 4 May 2021 14:29:06 -0400
|
||||
Subject: [PATCH] Bash-5.1 patch 5: fix memory leaks in compound array
|
||||
assignments
|
||||
|
||||
---
|
||||
arrayfunc.c | 11 +++--------
|
||||
patchlevel.h | 2 +-
|
||||
subst.c | 2 ++
|
||||
3 files changed, 6 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/arrayfunc.c b/arrayfunc.c
|
||||
index 8231ba1e..9338dfc7 100644
|
||||
--- a/arrayfunc.c
|
||||
+++ b/arrayfunc.c
|
||||
@@ -564,12 +564,9 @@ assign_assoc_from_kvlist (var, nlist, h, flags)
|
||||
{
|
||||
WORD_LIST *list;
|
||||
char *akey, *aval, *k, *v;
|
||||
- int free_aval;
|
||||
|
||||
for (list = nlist; list; list = list->next)
|
||||
{
|
||||
- free_aval = 0;
|
||||
-
|
||||
k = list->word->word;
|
||||
v = list->next ? list->next->word->word : 0;
|
||||
|
||||
@@ -577,24 +574,22 @@ assign_assoc_from_kvlist (var, nlist, h, flags)
|
||||
list = list->next;
|
||||
|
||||
akey = expand_assignment_string_to_string (k, 0);
|
||||
- aval = expand_assignment_string_to_string (v, 0);
|
||||
-
|
||||
if (akey == 0 || *akey == 0)
|
||||
{
|
||||
err_badarraysub (k);
|
||||
FREE (akey);
|
||||
continue;
|
||||
}
|
||||
+
|
||||
+ aval = expand_assignment_string_to_string (v, 0);
|
||||
if (aval == 0)
|
||||
{
|
||||
aval = (char *)xmalloc (1);
|
||||
aval[0] = '\0'; /* like do_assignment_internal */
|
||||
- free_aval = 1;
|
||||
}
|
||||
|
||||
bind_assoc_var_internal (var, h, akey, aval, flags);
|
||||
- if (free_aval)
|
||||
- free (aval);
|
||||
+ free (aval);
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/patchlevel.h b/patchlevel.h
|
||||
index e1429c24..c7f39aec 100644
|
||||
--- 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 4
|
||||
+#define PATCHLEVEL 5
|
||||
|
||||
#endif /* _PATCHLEVEL_H_ */
|
||||
diff --git a/subst.c b/subst.c
|
||||
index 6132316a..1d24188e 100644
|
||||
--- a/subst.c
|
||||
+++ b/subst.c
|
||||
@@ -11673,6 +11673,8 @@ expand_compound_assignment_word (tlist, flags)
|
||||
free (value);
|
||||
|
||||
value = string_list (l);
|
||||
+ dispose_words (l);
|
||||
+
|
||||
wlen = STRLEN (value);
|
||||
|
||||
/* Now, let's rebuild the string */
|
||||
--
|
||||
2.27.0
|
||||
|
||||
@ -1,44 +0,0 @@
|
||||
From f3cd936b81006df41a1c8509891dea1edeaef8e6 Mon Sep 17 00:00:00 2001
|
||||
From: Chet Ramey <chet.ramey@case.edu>
|
||||
Date: Tue, 4 May 2021 14:30:17 -0400
|
||||
Subject: [PATCH] Bash-5.1 patch 6: make sure child processes forked to execute
|
||||
command substitutions are in the right process group
|
||||
|
||||
---
|
||||
patchlevel.h | 2 +-
|
||||
subst.c | 7 +++++++
|
||||
2 files changed, 8 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/patchlevel.h b/patchlevel.h
|
||||
index c7f39aec..6257aeeb 100644
|
||||
--- 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 5
|
||||
+#define PATCHLEVEL 6
|
||||
|
||||
#endif /* _PATCHLEVEL_H_ */
|
||||
diff --git a/subst.c b/subst.c
|
||||
index 1d24188e..462752de 100644
|
||||
--- a/subst.c
|
||||
+++ b/subst.c
|
||||
@@ -6412,6 +6412,13 @@ command_substitute (string, quoted, flags)
|
||||
/* The currently executing shell is not interactive. */
|
||||
interactive = 0;
|
||||
|
||||
+#if defined (JOB_CONTROL)
|
||||
+ /* Invariant: in child processes started to run command substitutions,
|
||||
+ pipeline_pgrp == shell_pgrp. Other parts of the shell assume this. */
|
||||
+ if (pipeline_pgrp > 0 && pipeline_pgrp != shell_pgrp)
|
||||
+ shell_pgrp = pipeline_pgrp;
|
||||
+#endif
|
||||
+
|
||||
set_sigint_handler (); /* XXX */
|
||||
|
||||
free_pushed_string_input ();
|
||||
--
|
||||
2.27.0
|
||||
|
||||
@ -1,71 +0,0 @@
|
||||
From b72f88db852104cf49cfb4762eda6e8f4fd20a70 Mon Sep 17 00:00:00 2001
|
||||
From: Chet Ramey <chet.ramey@case.edu>
|
||||
Date: Tue, 4 May 2021 14:31:05 -0400
|
||||
Subject: [PATCH] Bash-5.1 patch 7: fix version comparisons in readline startup
|
||||
files
|
||||
|
||||
---
|
||||
lib/readline/bind.c | 15 ++++++++-------
|
||||
patchlevel.h | 2 +-
|
||||
2 files changed, 9 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/lib/readline/bind.c b/lib/readline/bind.c
|
||||
index 87596dce..76103786 100644
|
||||
--- a/lib/readline/bind.c
|
||||
+++ b/lib/readline/bind.c
|
||||
@@ -1234,7 +1234,7 @@ parser_if (char *args)
|
||||
#endif /* VI_MODE */
|
||||
else if (_rl_strnicmp (args, "version", 7) == 0)
|
||||
{
|
||||
- int rlversion, versionarg, op, previ, major, minor;
|
||||
+ int rlversion, versionarg, op, previ, major, minor, opresult;
|
||||
|
||||
_rl_parsing_conditionalized_out = 1;
|
||||
rlversion = RL_VERSION_MAJOR*10 + RL_VERSION_MINOR;
|
||||
@@ -1294,24 +1294,25 @@ parser_if (char *args)
|
||||
switch (op)
|
||||
{
|
||||
case OP_EQ:
|
||||
- _rl_parsing_conditionalized_out = rlversion == versionarg;
|
||||
+ opresult = rlversion == versionarg;
|
||||
break;
|
||||
case OP_NE:
|
||||
- _rl_parsing_conditionalized_out = rlversion != versionarg;
|
||||
+ opresult = rlversion != versionarg;
|
||||
break;
|
||||
case OP_GT:
|
||||
- _rl_parsing_conditionalized_out = rlversion > versionarg;
|
||||
+ opresult = rlversion > versionarg;
|
||||
break;
|
||||
case OP_GE:
|
||||
- _rl_parsing_conditionalized_out = rlversion >= versionarg;
|
||||
+ opresult = rlversion >= versionarg;
|
||||
break;
|
||||
case OP_LT:
|
||||
- _rl_parsing_conditionalized_out = rlversion < versionarg;
|
||||
+ opresult = rlversion < versionarg;
|
||||
break;
|
||||
case OP_LE:
|
||||
- _rl_parsing_conditionalized_out = rlversion <= versionarg;
|
||||
+ opresult = rlversion <= versionarg;
|
||||
break;
|
||||
}
|
||||
+ _rl_parsing_conditionalized_out = 1 - opresult;
|
||||
}
|
||||
/* Check to see if the first word in ARGS is the same as the
|
||||
value stored in rl_readline_name. */
|
||||
diff --git a/patchlevel.h b/patchlevel.h
|
||||
index 6257aeeb..c5ed66ab 100644
|
||||
--- 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 6
|
||||
+#define PATCHLEVEL 7
|
||||
|
||||
#endif /* _PATCHLEVEL_H_ */
|
||||
--
|
||||
2.27.0
|
||||
|
||||
@ -1,49 +0,0 @@
|
||||
From ce23728687ce9e584333367075c9deef413553fa Mon Sep 17 00:00:00 2001
|
||||
From: Chet Ramey <chet.ramey@case.edu>
|
||||
Date: Tue, 4 May 2021 14:31:53 -0400
|
||||
Subject: [PATCH] Bash-5.1 patch 8: clean up FIFOs created by redirections in
|
||||
child processes
|
||||
|
||||
---
|
||||
execute_cmd.c | 8 +++++++-
|
||||
patchlevel.h | 2 +-
|
||||
2 files changed, 8 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/execute_cmd.c b/execute_cmd.c
|
||||
index d2a0dd71..90129e06 100644
|
||||
--- a/execute_cmd.c
|
||||
+++ b/execute_cmd.c
|
||||
@@ -5556,11 +5556,17 @@ execute_disk_command (words, redirects, command_line, pipe_in, pipe_out,
|
||||
#if defined (PROCESS_SUBSTITUTION)
|
||||
/* Try to remove named pipes that may have been created as the
|
||||
result of redirections. */
|
||||
- unlink_fifo_list ();
|
||||
+ unlink_all_fifos ();
|
||||
#endif /* PROCESS_SUBSTITUTION */
|
||||
exit (EXECUTION_FAILURE);
|
||||
}
|
||||
|
||||
+#if defined (PROCESS_SUBSTITUTION) && !defined (HAVE_DEV_FD)
|
||||
+ /* This should only contain FIFOs created as part of redirection
|
||||
+ expansion. */
|
||||
+ unlink_all_fifos ();
|
||||
+#endif
|
||||
+
|
||||
if (async)
|
||||
interactive = old_interactive;
|
||||
|
||||
diff --git a/patchlevel.h b/patchlevel.h
|
||||
index c5ed66ab..10fde2ee 100644
|
||||
--- 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 7
|
||||
+#define PATCHLEVEL 8
|
||||
|
||||
#endif /* _PATCHLEVEL_H_ */
|
||||
--
|
||||
2.27.0
|
||||
|
||||
Binary file not shown.
19
bash.spec
19
bash.spec
@ -1,6 +1,6 @@
|
||||
Name: bash
|
||||
Version: 5.1
|
||||
Release: 2
|
||||
Version: 5.1.8
|
||||
Release: 1
|
||||
Summary: It is the Bourne Again Shell
|
||||
License: GPLv3
|
||||
URL: https://www.gnu.org/software/bash
|
||||
@ -23,15 +23,6 @@ Patch134: bash-4.3-memleak-lc_all.patch
|
||||
Patch137: bugfix-Forbidden-non-root-user-to-clear-history.patch
|
||||
Patch138: enable-dot-logout-and-source-bashrc-through-ssh.patch
|
||||
|
||||
Patch139: backport-Bash-5.1-patch-1-add-dependency-to-Makefile-to-fix-h.patch
|
||||
Patch140: backport-Bash-5.1-patch-2-fix-wait-n-p-var-with-no-jobs-not-l.patch
|
||||
Patch141: backport-Bash-5.1-patch-3-fix-command-substitution-in-here-do.patch
|
||||
Patch142: backport-Bash-5.1-patch-4-fix-key-value-pair-associative-arra.patch
|
||||
Patch143: backport-Bash-5.1-patch-5-fix-memory-leaks-in-compound-array-.patch
|
||||
Patch144: backport-Bash-5.1-patch-6-make-sure-child-processes-forked-to.patch
|
||||
Patch145: backport-Bash-5.1-patch-7-fix-version-comparisons-in-readline.patch
|
||||
Patch146: backport-Bash-5.1-patch-8-clean-up-FIFOs-created-by-redirecti.patch
|
||||
|
||||
BuildRequires: gcc bison texinfo autoconf ncurses-devel
|
||||
# Required for bash tests
|
||||
BuildRequires: glibc-all-langpacks
|
||||
@ -122,6 +113,12 @@ make check
|
||||
%exclude %{_infodir}/dir
|
||||
|
||||
%changelog
|
||||
* Thu Dec 30 2021 wangjie <wangjie375@huawei.com> - 5.1.8-1
|
||||
- Type:enhancement
|
||||
- ID:NA
|
||||
- SUG:NA
|
||||
- DESC: Update bash to 5.1.8
|
||||
|
||||
* Fri Jun 18 2021 liujian<liujianliu.liu@huawei.com> - 5.1-2
|
||||
- Type:enhancement
|
||||
- ID:NA
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user