]> git.ipfire.org Git - thirdparty/bash.git/commitdiff
Bash-5.0 patch 16: bash waits too long to reap /dev/fd process substitutions with...
authorChet Ramey <chet.ramey@case.edu>
Fri, 7 Feb 2020 20:20:38 +0000 (15:20 -0500)
committerChet Ramey <chet.ramey@case.edu>
Fri, 7 Feb 2020 20:20:38 +0000 (15:20 -0500)
execute_cmd.c
patchlevel.h

index f1d74bfecf0a4afcc2c06fe5f6bd8e9c816703e7..3864986d80c7d86787814c23500c732a1dfba714 100644 (file)
@@ -1103,6 +1103,22 @@ execute_command_internal (command, asynchronous, pipe_in, pipe_out,
       free ((void *)ofifo_list);
       discard_unwind_frame ("internal_fifos");
     }
+# if defined (HAVE_DEV_FD)
+  /* Reap process substitutions at the end of loops */
+  switch (command->type)
+    {
+    case cm_while:
+    case cm_until:
+    case cm_for:
+    case cm_group:
+#    if defined (ARITH_FOR_COMMAND)
+    case cm_arith_for:
+#    endif
+      reap_procsubs ();
+    default:
+      break;
+    }
+#  endif /* HAVE_DEV_FD */
 #endif
 
   /* Invert the return value if we have to */
index 6e9ed3fc898ad66e9b99411775508d5b5a563174..9074f4ddf987981a48310ff80666659c95600300 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 15
+#define PATCHLEVEL 16
 
 #endif /* _PATCHLEVEL_H_ */