Blame SOURCES/bash-5.1-patch-8.patch

bb9a7e
From ce23728687ce9e584333367075c9deef413553fa Mon Sep 17 00:00:00 2001
bb9a7e
From: Chet Ramey <chet.ramey@case.edu>
bb9a7e
Date: Tue, 4 May 2021 14:31:53 -0400
bb9a7e
Subject: [PATCH] Bash-5.1 patch 8: clean up FIFOs created by redirections in
bb9a7e
 child processes
bb9a7e
bb9a7e
---
bb9a7e
 execute_cmd.c | 8 +++++++-
bb9a7e
 patchlevel.h  | 2 +-
bb9a7e
 2 files changed, 8 insertions(+), 2 deletions(-)
bb9a7e
bb9a7e
diff --git a/execute_cmd.c b/execute_cmd.c
bb9a7e
index d2a0dd71..90129e06 100644
bb9a7e
--- a/execute_cmd.c
bb9a7e
+++ b/execute_cmd.c
bb9a7e
@@ -5556,11 +5556,17 @@ execute_disk_command (words, redirects, command_line, pipe_in, pipe_out,
bb9a7e
 #if defined (PROCESS_SUBSTITUTION)
bb9a7e
 	  /* Try to remove named pipes that may have been created as the
bb9a7e
 	     result of redirections. */
bb9a7e
-	  unlink_fifo_list ();
bb9a7e
+	  unlink_all_fifos ();
bb9a7e
 #endif /* PROCESS_SUBSTITUTION */
bb9a7e
 	  exit (EXECUTION_FAILURE);
bb9a7e
 	}
bb9a7e
 
bb9a7e
+#if defined (PROCESS_SUBSTITUTION) && !defined (HAVE_DEV_FD)
bb9a7e
+      /* This should only contain FIFOs created as part of redirection
bb9a7e
+	 expansion. */
bb9a7e
+      unlink_all_fifos ();
bb9a7e
+#endif
bb9a7e
+
bb9a7e
       if (async)
bb9a7e
 	interactive = old_interactive;
bb9a7e
 
bb9a7e
diff --git a/patchlevel.h b/patchlevel.h
bb9a7e
index c5ed66ab..10fde2ee 100644
bb9a7e
--- a/patchlevel.h
bb9a7e
+++ b/patchlevel.h
bb9a7e
@@ -25,6 +25,6 @@
bb9a7e
    regexp `^#define[ 	]*PATCHLEVEL', since that's what support/mkversion.sh
bb9a7e
    looks for to find the patch level (for the sccs version string). */
bb9a7e
 
bb9a7e
-#define PATCHLEVEL 7
bb9a7e
+#define PATCHLEVEL 8
bb9a7e
 
bb9a7e
 #endif /* _PATCHLEVEL_H_ */
bb9a7e
-- 
bb9a7e
2.29.2
bb9a7e