rcolebaugh / rpms / bash

Forked from rpms/bash a year ago
Clone
07a490
			     BASH PATCH REPORT
07a490
			     =================
07a490
07a490
Bash-Release:	4.2
07a490
Patch-ID:	bash42-040
07a490
07a490
Bug-Reported-by:	Andrey Zaitsev <jstcdr@gmail.com>
07a490
Bug-Reference-ID:	<CAEZVQT5PJ1Mb_Zh8LT5qz8sv+-9Q6hGfQ5DU9ZxdJ+gV7xBUaQ@mail.gmail.com>
07a490
Bug-Reference-URL:	http://lists.gnu.org/archive/html/bug-bash/2012-04/msg00144.html
07a490
07a490
Bug-Description:
07a490
07a490
Output redirection applied to builtin commands missed I/O errors if
07a490
they happened when the file descriptor was closed, rather than on write
07a490
(e.g., like with an out-of-space error on a remote NFS file system).
07a490
07a490
Patch (apply with `patch -p0'):
07a490
07a490
*** ../bash-4.2-patched/redir.c	2011-01-02 16:00:31.000000000 -0500
07a490
--- redir.c	2012-04-24 20:42:12.000000000 -0400
07a490
***************
07a490
*** 1092,1099 ****
07a490
  #if defined (BUFFERED_INPUT)
07a490
  	  check_bash_input (redirector);
07a490
! 	  close_buffered_fd (redirector);
07a490
  #else /* !BUFFERED_INPUT */
07a490
! 	  close (redirector);
07a490
  #endif /* !BUFFERED_INPUT */
07a490
  	}
07a490
        break;
07a490
--- 1092,1101 ----
07a490
  #if defined (BUFFERED_INPUT)
07a490
  	  check_bash_input (redirector);
07a490
! 	  r = close_buffered_fd (redirector);
07a490
  #else /* !BUFFERED_INPUT */
07a490
! 	  r = close (redirector);
07a490
  #endif /* !BUFFERED_INPUT */
07a490
+ 	  if (r < 0 && (flags & RX_INTERNAL) && (errno == EIO || errno == ENOSPC))
07a490
+ 	    REDIRECTION_ERROR (r, errno, -1);
07a490
  	}
07a490
        break;
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 39
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 40
07a490
  
07a490
  #endif /* _PATCHLEVEL_H_ */