]> git.ipfire.org Git - thirdparty/bash.git/commitdiff
Bash-4.4 patch 4
authorChet Ramey <chet.ramey@case.edu>
Mon, 14 Nov 2016 19:27:35 +0000 (14:27 -0500)
committerChet Ramey <chet.ramey@case.edu>
Mon, 14 Nov 2016 19:27:35 +0000 (14:27 -0500)
jobs.c
jobs.h
patchlevel.h
subst.c

diff --git a/jobs.c b/jobs.c
index cef3c79aa6b60a6d999b9c986074a183ed278d9f..fc966036663935156efae44d1909f3670fd9e52a 100644 (file)
--- a/jobs.c
+++ b/jobs.c
@@ -453,6 +453,21 @@ cleanup_the_pipeline ()
     discard_pipeline (disposer);
 }
 
+void
+discard_last_procsub_child ()
+{
+  PROCESS *disposer;
+  sigset_t set, oset;
+
+  BLOCK_CHILD (set, oset);
+  disposer = last_procsub_child;
+  last_procsub_child = (PROCESS *)NULL;
+  UNBLOCK_CHILD (oset);
+
+  if (disposer)
+    discard_pipeline (disposer);
+}
+
 struct pipeline_saver *
 alloc_pipeline_saver ()
 {
diff --git a/jobs.h b/jobs.h
index 4ba3513c477730c4ab5f622bfec03934812e413f..6df0607ed11f0cd79198148727c97aaecb380424 100644 (file)
--- a/jobs.h
+++ b/jobs.h
@@ -190,6 +190,7 @@ extern JOB **jobs;
 extern void making_children __P((void));
 extern void stop_making_children __P((void));
 extern void cleanup_the_pipeline __P((void));
+extern void discard_last_procsub_child __P((void));
 extern void save_pipeline __P((int));
 extern PROCESS *restore_pipeline __P((int));
 extern void start_pipeline __P((void));
index e7e960c1a28cc30fc0a3fa8257bb326b4140442c..c059f0bd769b78ddf0bf0c5c1394e2ec8858d067 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 3
+#define PATCHLEVEL 4
 
 #endif /* _PATCHLEVEL_H_ */
diff --git a/subst.c b/subst.c
index 4d498ef3646222e3ead4a56b3be1cc25f3e6edbd..298187d2f02c38f0763858a991408efcb12e41b5 100644 (file)
--- a/subst.c
+++ b/subst.c
@@ -5808,10 +5808,7 @@ process_substitute (string, open_for_read_in_child)
     {
 #if defined (JOB_CONTROL)
       if (last_procsub_child)
-       {
-         discard_pipeline (last_procsub_child);
-         last_procsub_child = (PROCESS *)NULL;
-       }
+       discard_last_procsub_child ();
       last_procsub_child = restore_pipeline (0);
 #endif