]> git.ipfire.org Git - thirdparty/bash.git/commitdiff
Bash-5.1 patch 8: clean up FIFOs created by redirections in child processes
authorChet Ramey <chet.ramey@case.edu>
Tue, 4 May 2021 18:31:53 +0000 (14:31 -0400)
committerChet Ramey <chet.ramey@case.edu>
Tue, 4 May 2021 18:31:53 +0000 (14:31 -0400)
execute_cmd.c
patchlevel.h

index d2a0dd71cae596e3ab214a9f08b4741bf1f67148..90129e066313dae1b818262d30ef4e3f2d7f7dd1 100644 (file)
@@ -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;
 
index c5ed66ab666fc65789f261523a3234a96cfa5272..10fde2eee1386e47902806f4e4eb478f9ecd75eb 100644 (file)
@@ -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_ */