rcolebaugh / rpms / bash

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