Blame SOURCES/bash42-045

287226
			     BASH PATCH REPORT
287226
			     =================
287226
287226
Bash-Release:	4.2
287226
Patch-ID:	bash42-045
287226
287226
Bug-Reported-by:	Stephane Chazelas <stephane.chazelas@gmail.com>
287226
Bug-Reference-ID:	<20130218195539.GA9620@chaz.gmail.com>
287226
Bug-Reference-URL:	http://lists.gnu.org/archive/html/bug-bash/2013-02/msg00080.html
287226
287226
Bug-Description:
287226
287226
The <&n- and >&n- redirections, which move one file descriptor to another,
287226
leave the file descriptor closed when applied to builtins or compound
287226
commands.
287226
287226
Patch (apply with `patch -p0'):
287226
287226
*** ../bash-4.2-patched/redir.c	2013-01-30 11:56:09.000000000 -0500
287226
--- redir.c	2013-02-19 09:38:36.000000000 -0500
287226
***************
287226
*** 1008,1011 ****
287226
--- 1008,1021 ----
287226
  	      REDIRECTION_ERROR (r, errno, -1);
287226
  	    }
287226
+ 	  if ((flags & RX_UNDOABLE) && (ri == r_move_input || ri == r_move_output))
287226
+ 	    {
287226
+ 	      /* r_move_input and r_move_output add an additional close()
287226
+ 		 that needs to be undone */
287226
+ 	      if (fcntl (redirector, F_GETFD, 0) != -1)
287226
+ 		{
287226
+ 		  r = add_undo_redirect (redir_fd, r_close_this, -1);
287226
+ 		  REDIRECTION_ERROR (r, errno, -1);
287226
+ 		}
287226
+ 	    }
287226
  #if defined (BUFFERED_INPUT)
287226
  	  check_bash_input (redirector);
287226
287226
*** ../bash-4.2-patched/patchlevel.h	Sat Jun 12 20:14:48 2010
287226
--- patchlevel.h	Thu Feb 24 21:41:34 2011
287226
***************
287226
*** 26,30 ****
287226
     looks for to find the patch level (for the sccs version string). */
287226
  
287226
! #define PATCHLEVEL 44
287226
  
287226
  #endif /* _PATCHLEVEL_H_ */
287226
--- 26,30 ----
287226
     looks for to find the patch level (for the sccs version string). */
287226
  
287226
! #define PATCHLEVEL 45
287226
  
287226
  #endif /* _PATCHLEVEL_H_ */