diff -urp bash-4.2.orig/execute_cmd.c bash-4.2/execute_cmd.c --- bash-4.2.orig/execute_cmd.c 2011-09-14 01:31:25.627527470 +0200 +++ bash-4.2/execute_cmd.c 2011-09-14 01:32:34.365668126 +0200 @@ -2202,7 +2202,11 @@ execute_pipeline (command, asynchronous, /* If the `lastpipe' option is set with shopt, and job control is not enabled, execute the last element of non-async pipelines in the current shell environment. */ +#if defined (JOB_CONTROL) if (lastpipe_opt && job_control == 0 && asynchronous == 0 && pipe_out == NO_PIPE && prev > 0) +#else + if (lastpipe_opt && asynchronous == 0 && pipe_out == NO_PIPE && prev > 0) +#endif /* JOB_CONTROL */ { lstdin = move_to_high_fd (0, 0, 255); if (lstdin > 0)