BASH PATCH REPORT ================= Bash-Release: 4.2 Patch-ID: bash42-018 Bug-Reported-by: Thomas Cort Bug-Reference-ID: Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2011-06/msg00110.html Bug-Description: Bash fails to compile unless JOB_CONTROL is defined. Patch (apply with `patch -p0'): --- a/execute_cmd.c +++ b/execute_cmd.c @@ -2196,6 +2196,7 @@ execute_pipeline (command, asynchronous, if (ignore_return && cmd) cmd->flags |= CMD_IGNORE_RETURN; +#if defined (JOB_CONTROL) lastpipe_flag = 0; begin_unwind_frame ("lastpipe-exec"); lstdin = -1; @@ -2219,15 +2220,19 @@ execute_pipeline (command, asynchronous, lastpipe_jid = stop_pipeline (0, (COMMAND *)NULL); /* XXX */ add_unwind_protect (lastpipe_cleanup, lastpipe_jid); } - cmd->flags |= CMD_LASTPIPE; + if (cmd) + cmd->flags |= CMD_LASTPIPE; } if (prev >= 0) add_unwind_protect (close, prev); +#endif exec_result = execute_command_internal (cmd, asynchronous, prev, pipe_out, fds_to_close); +#if defined (JOB_CONTROL) if (lstdin > 0) restore_stdin (lstdin); +#endif if (prev >= 0) close (prev); --- 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 17 +#define PATCHLEVEL 18 #endif /* _PATCHLEVEL_H_ */