]> git.ipfire.org Git - thirdparty/bash.git/commitdiff
Bash-4.3 patch 22
authorChet Ramey <chet.ramey@case.edu>
Fri, 1 Aug 2014 19:31:14 +0000 (15:31 -0400)
committerChet Ramey <chet.ramey@case.edu>
Fri, 1 Aug 2014 19:33:00 +0000 (15:33 -0400)
execute_cmd.c
patchlevel.h

index f9a755de82a29ebb199b1295ae4ea80ae2ff5ac0..9cebaef34fd48f36a1a4ed768fa19815ef5005fe 100644 (file)
@@ -2409,7 +2409,16 @@ execute_pipeline (command, asynchronous, pipe_in, pipe_out, fds_to_close)
 #endif
       lstdin = wait_for (lastpid);
 #if defined (JOB_CONTROL)
-      exec_result = job_exit_status (lastpipe_jid);
+      /* If wait_for removes the job from the jobs table, use result of last
+        command as pipeline's exit status as usual.  The jobs list can get
+        frozen and unfrozen at inconvenient times if there are multiple pipelines
+        running simultaneously. */
+      if (INVALID_JOB (lastpipe_jid) == 0)
+       exec_result = job_exit_status (lastpipe_jid);
+      else if (pipefail_opt)
+       exec_result = exec_result | lstdin;     /* XXX */
+      /* otherwise we use exec_result */
+        
 #endif
       unfreeze_jobs_list ();
     }
index bc7f5f80962d5050cafd10a7263ae2f0e0912e7f..c8605ba6f8528d1b8bf0508534c31840766d2c62 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 21
+#define PATCHLEVEL 22
 
 #endif /* _PATCHLEVEL_H_ */