components/bash/patches/bash42-040.patch
changeset 5518 c47fe0edc204
parent 5517 7758049098f4
child 5519 a02d4d12218f
equal deleted inserted replaced
5517:7758049098f4 5518:c47fe0edc204
     1 			     BASH PATCH REPORT
       
     2 			     =================
       
     3 
       
     4 Bash-Release:	4.2
       
     5 Patch-ID:	bash42-040
       
     6 
       
     7 Bug-Reported-by:	Andrey Zaitsev <[email protected]>
       
     8 Bug-Reference-ID:	<CAEZVQT5PJ1Mb_Zh8LT5qz8sv+-9Q6hGfQ5DU9ZxdJ+gV7xBUaQ@mail.gmail.com>
       
     9 Bug-Reference-URL:	http://lists.gnu.org/archive/html/bug-bash/2012-04/msg00144.html
       
    10 
       
    11 Bug-Description:
       
    12 
       
    13 Output redirection applied to builtin commands missed I/O errors if
       
    14 they happened when the file descriptor was closed, rather than on write
       
    15 (e.g., like with an out-of-space error on a remote NFS file system).
       
    16 
       
    17 Patch (apply with `patch -p0'):
       
    18 
       
    19 *** ../bash-4.2-patched/redir.c	2011-01-02 16:00:31.000000000 -0500
       
    20 --- redir.c	2012-04-24 20:42:12.000000000 -0400
       
    21 ***************
       
    22 *** 1092,1099 ****
       
    23   #if defined (BUFFERED_INPUT)
       
    24   	  check_bash_input (redirector);
       
    25 ! 	  close_buffered_fd (redirector);
       
    26   #else /* !BUFFERED_INPUT */
       
    27 ! 	  close (redirector);
       
    28   #endif /* !BUFFERED_INPUT */
       
    29   	}
       
    30         break;
       
    31 --- 1092,1101 ----
       
    32   #if defined (BUFFERED_INPUT)
       
    33   	  check_bash_input (redirector);
       
    34 ! 	  r = close_buffered_fd (redirector);
       
    35   #else /* !BUFFERED_INPUT */
       
    36 ! 	  r = close (redirector);
       
    37   #endif /* !BUFFERED_INPUT */
       
    38 + 	  if (r < 0 && (flags & RX_INTERNAL) && (errno == EIO || errno == ENOSPC))
       
    39 + 	    REDIRECTION_ERROR (r, errno, -1);
       
    40   	}
       
    41         break;
       
    42 *** ../bash-4.2-patched/patchlevel.h	Sat Jun 12 20:14:48 2010
       
    43 --- patchlevel.h	Thu Feb 24 21:41:34 2011
       
    44 ***************
       
    45 *** 26,30 ****
       
    46      looks for to find the patch level (for the sccs version string). */
       
    47   
       
    48 ! #define PATCHLEVEL 39
       
    49   
       
    50   #endif /* _PATCHLEVEL_H_ */
       
    51 --- 26,30 ----
       
    52      looks for to find the patch level (for the sccs version string). */
       
    53   
       
    54 ! #define PATCHLEVEL 40
       
    55   
       
    56   #endif /* _PATCHLEVEL_H_ */