|
1 BASH PATCH REPORT |
|
2 ================= |
|
3 |
|
4 Bash-Release: 4.2 |
|
5 Patch-ID: bash42-045 |
|
6 |
|
7 Bug-Reported-by: Stephane Chazelas <[email protected]> |
|
8 Bug-Reference-ID: <[email protected]> |
|
9 Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2013-02/msg00080.html |
|
10 |
|
11 Bug-Description: |
|
12 |
|
13 The <&n- and >&n- redirections, which move one file descriptor to another, |
|
14 leave the file descriptor closed when applied to builtins or compound |
|
15 commands. |
|
16 |
|
17 Patch (apply with `patch -p0'): |
|
18 |
|
19 *** ../bash-4.2-patched/redir.c 2013-01-30 11:56:09.000000000 -0500 |
|
20 --- redir.c 2013-02-19 09:38:36.000000000 -0500 |
|
21 *************** |
|
22 *** 1008,1011 **** |
|
23 --- 1008,1021 ---- |
|
24 REDIRECTION_ERROR (r, errno, -1); |
|
25 } |
|
26 + if ((flags & RX_UNDOABLE) && (ri == r_move_input || ri == r_move_output)) |
|
27 + { |
|
28 + /* r_move_input and r_move_output add an additional close() |
|
29 + that needs to be undone */ |
|
30 + if (fcntl (redirector, F_GETFD, 0) != -1) |
|
31 + { |
|
32 + r = add_undo_redirect (redir_fd, r_close_this, -1); |
|
33 + REDIRECTION_ERROR (r, errno, -1); |
|
34 + } |
|
35 + } |
|
36 #if defined (BUFFERED_INPUT) |
|
37 check_bash_input (redirector); |
|
38 |
|
39 *** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010 |
|
40 --- patchlevel.h Thu Feb 24 21:41:34 2011 |
|
41 *************** |
|
42 *** 26,30 **** |
|
43 looks for to find the patch level (for the sccs version string). */ |
|
44 |
|
45 ! #define PATCHLEVEL 44 |
|
46 |
|
47 #endif /* _PATCHLEVEL_H_ */ |
|
48 --- 26,30 ---- |
|
49 looks for to find the patch level (for the sccs version string). */ |
|
50 |
|
51 ! #define PATCHLEVEL 45 |
|
52 |
|
53 #endif /* _PATCHLEVEL_H_ */ |