Branch oldpackages for 14.07
[14.07/packages.git] / utils / bash / patches / 126-upstream-bash42-026.patch
1                              BASH PATCH REPORT
2                              =================
3
4 Bash-Release:   4.2
5 Patch-ID:       bash42-026
6
7 Bug-Reported-by:        Greg Wooledge <wooledg@eeg.ccf.org>
8 Bug-Reference-ID:       <20120425180443.GO22241@eeg.ccf.org>
9 Bug-Reference-URL:      http://lists.gnu.org/archive/html/bug-bash/2012-04/msg00172.html
10
11 Bug-Description:
12
13 The `lastpipe' option does not behave correctly on machines where the
14 open file limit is less than 256.
15
16 Patch (apply with `patch -p0'):
17
18 --- a/execute_cmd.c
19 +++ b/execute_cmd.c
20 @@ -2209,7 +2209,7 @@ execute_pipeline (command, asynchronous,
21  #endif
22                 asynchronous == 0 && pipe_out == NO_PIPE && prev > 0)
23      {
24 -      lstdin = move_to_high_fd (0, 0, 255);
25 +      lstdin = move_to_high_fd (0, 1, -1);
26        if (lstdin > 0)
27         {
28           do_piping (prev, pipe_out);
29 @@ -2255,7 +2255,9 @@ execute_pipeline (command, asynchronous,
30        unfreeze_jobs_list ();
31      }
32  
33 +#if defined (JOB_CONTROL)
34    discard_unwind_frame ("lastpipe-exec");
35 +#endif
36  
37    return (exec_result);
38  }
39 --- a/patchlevel.h
40 +++ b/patchlevel.h
41 @@ -25,6 +25,6 @@
42     regexp `^#define[   ]*PATCHLEVEL', since that's what support/mkversion.sh
43     looks for to find the patch level (for the sccs version string). */
44  
45 -#define PATCHLEVEL 25
46 +#define PATCHLEVEL 26
47  
48  #endif /* _PATCHLEVEL_H_ */