Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | Upstream-Status: Inappropriate [embedded specific] |
| 2 | |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 3 | Rebase to 5.0 |
| 4 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> |
| 5 | --- |
| 6 | execute_cmd.c | 6 +++++- |
| 7 | 1 file changed, 5 insertions(+), 1 deletion(-) |
| 8 | |
| 9 | diff --git a/execute_cmd.c b/execute_cmd.c |
| 10 | index f1d74bf..31674b4 100644 |
| 11 | --- a/execute_cmd.c |
| 12 | +++ b/execute_cmd.c |
| 13 | @@ -2567,7 +2567,11 @@ execute_pipeline (command, asynchronous, pipe_in, pipe_out, fds_to_close) |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 14 | /* If the `lastpipe' option is set with shopt, and job control is not |
| 15 | enabled, execute the last element of non-async pipelines in the |
| 16 | current shell environment. */ |
| 17 | - if (lastpipe_opt && job_control == 0 && asynchronous == 0 && pipe_out == NO_PIPE && prev > 0) |
| 18 | + if (lastpipe_opt && |
| 19 | +#if defined(JOB_CONTROL) |
| 20 | + job_control == 0 && |
| 21 | +#endif |
| 22 | + asynchronous == 0 && pipe_out == NO_PIPE && prev > 0) |
| 23 | { |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 24 | lstdin = move_to_high_fd (0, 1, -1); |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 25 | if (lstdin > 0) |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 26 | -- |
| 27 | 2.7.4 |
| 28 | |