diff options
author | Chet Ramey <chet.ramey@case.edu> | 2014-08-01 15:31:14 -0400 |
---|---|---|
committer | Chet Ramey <chet.ramey@case.edu> | 2014-08-01 15:33:00 -0400 |
commit | df2c55de9c87c2ee8904280d26e80f5c48dd6434 (patch) | |
tree | 51edf9f0688a15af97536b42ab9caf43fee19c9d | |
parent | 000623837190281ded05e4da784f3a72b19f4aae (diff) | |
download | android_external_bash-df2c55de9c87c2ee8904280d26e80f5c48dd6434.tar.gz android_external_bash-df2c55de9c87c2ee8904280d26e80f5c48dd6434.tar.bz2 android_external_bash-df2c55de9c87c2ee8904280d26e80f5c48dd6434.zip |
Bash-4.3 patch 22
-rw-r--r-- | execute_cmd.c | 11 | ||||
-rw-r--r-- | patchlevel.h | 2 |
2 files changed, 11 insertions, 2 deletions
diff --git a/execute_cmd.c b/execute_cmd.c index f9a755d..9cebaef 100644 --- a/execute_cmd.c +++ b/execute_cmd.c @@ -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 (); } diff --git a/patchlevel.h b/patchlevel.h index bc7f5f8..c8605ba 100644 --- a/patchlevel.h +++ b/patchlevel.h @@ -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_ */ |