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