Roman Rakus 87dc31
			     BASH PATCH REPORT
Roman Rakus 87dc31
			     =================
Roman Rakus 87dc31
Roman Rakus 87dc31
Bash-Release:	4.2
Roman Rakus 87dc31
Patch-ID:	bash42-026
Roman Rakus 87dc31
Roman Rakus 87dc31
Bug-Reported-by:	Greg Wooledge <wooledg@eeg.ccf.org>
Roman Rakus 87dc31
Bug-Reference-ID:	<20120425180443.GO22241@eeg.ccf.org>
Roman Rakus 87dc31
Bug-Reference-URL:	http://lists.gnu.org/archive/html/bug-bash/2012-04/msg00172.html
Roman Rakus 87dc31
Roman Rakus 87dc31
Bug-Description:
Roman Rakus 87dc31
Roman Rakus 87dc31
The `lastpipe' option does not behave correctly on machines where the
Roman Rakus 87dc31
open file limit is less than 256.
Roman Rakus 87dc31
Roman Rakus 87dc31
Patch (apply with `patch -p0'):
Roman Rakus 87dc31
Roman Rakus 87dc31
*** ../bash-4.2-patched/execute_cmd.c	2011-11-21 12:04:47.000000000 -0500
Roman Rakus 87dc31
--- execute_cmd.c	2012-04-26 11:09:30.000000000 -0400
Roman Rakus 87dc31
***************
Roman Rakus 87dc31
*** 2206,2210 ****
Roman Rakus 87dc31
    if (lastpipe_opt && job_control == 0 && asynchronous == 0 && pipe_out == NO_PIPE && prev > 0)
Roman Rakus 87dc31
      {
Roman Rakus 87dc31
!       lstdin = move_to_high_fd (0, 0, 255);
Roman Rakus 87dc31
        if (lstdin > 0)
Roman Rakus 87dc31
  	{
Roman Rakus 87dc31
--- 2325,2329 ----
Roman Rakus 87dc31
    if (lastpipe_opt && job_control == 0 && asynchronous == 0 && pipe_out == NO_PIPE && prev > 0)
Roman Rakus 87dc31
      {
Roman Rakus 87dc31
!       lstdin = move_to_high_fd (0, 1, -1);
Roman Rakus 87dc31
        if (lstdin > 0)
Roman Rakus 87dc31
  	{
Roman Rakus 87dc31
***************
Roman Rakus 87dc31
*** 2252,2256 ****
Roman Rakus 87dc31
--- 2371,2377 ----
Roman Rakus 87dc31
      }
Roman Rakus 87dc31
  
Roman Rakus 87dc31
+ #if defined (JOB_CONTROL)
Roman Rakus 87dc31
    discard_unwind_frame ("lastpipe-exec");
Roman Rakus 87dc31
+ #endif
Roman Rakus 87dc31
  
Roman Rakus 87dc31
    return (exec_result);
Roman Rakus 87dc31
Roman Rakus 87dc31
*** ../bash-4.2-patched/patchlevel.h	Sat Jun 12 20:14:48 2010
Roman Rakus 87dc31
--- patchlevel.h	Thu Feb 24 21:41:34 2011
Roman Rakus 87dc31
***************
Roman Rakus 87dc31
*** 26,30 ****
Roman Rakus 87dc31
     looks for to find the patch level (for the sccs version string). */
Roman Rakus 87dc31
  
Roman Rakus 87dc31
! #define PATCHLEVEL 25
Roman Rakus 87dc31
  
Roman Rakus 87dc31
  #endif /* _PATCHLEVEL_H_ */
Roman Rakus 87dc31
--- 26,30 ----
Roman Rakus 87dc31
     looks for to find the patch level (for the sccs version string). */
Roman Rakus 87dc31
  
Roman Rakus 87dc31
! #define PATCHLEVEL 26
Roman Rakus 87dc31
  
Roman Rakus 87dc31
  #endif /* _PATCHLEVEL_H_ */