projects
/
platform
/
upstream
/
bash.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
0006238
)
Bash-4.3 patch 22
author
Chet Ramey
<chet.ramey@case.edu>
Fri, 1 Aug 2014 19:31:14 +0000
(15:31 -0400)
committer
Chet Ramey
<chet.ramey@case.edu>
Fri, 1 Aug 2014 19:33:00 +0000
(15:33 -0400)
execute_cmd.c
patch
|
blob
|
history
patchlevel.h
patch
|
blob
|
history
diff --git
a/execute_cmd.c
b/execute_cmd.c
index
f9a755d
..
9cebaef
100644
(file)
--- 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)
#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 ();
}
#endif
unfreeze_jobs_list ();
}
diff --git
a/patchlevel.h
b/patchlevel.h
index
bc7f5f8
..
c8605ba
100644
(file)
--- 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). */
regexp `^#define[ ]*PATCHLEVEL', since that's what support/mkversion.sh
looks for to find the patch level (for the sccs version string). */
-#define PATCHLEVEL 2
1
+#define PATCHLEVEL 2
2
#endif /* _PATCHLEVEL_H_ */
#endif /* _PATCHLEVEL_H_ */