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
13 The `lastpipe' option does not behave correctly on machines where the
14 open file limit is less than 256.
16 Patch (apply with `patch -p0'):
18 Index: b/bash/execute_cmd.c
19 ===================================================================
20 --- a/bash/execute_cmd.c
21 +++ b/bash/execute_cmd.c
23 current shell environment. */
24 if (lastpipe_opt && job_control == 0 && asynchronous == 0 && pipe_out == NO_PIPE && prev > 0)
26 - lstdin = move_to_high_fd (0, 0, 255);
27 + lstdin = move_to_high_fd (0, 1, -1);
30 do_piping (prev, pipe_out);
32 unfreeze_jobs_list ();
35 +#if defined (JOB_CONTROL)
36 discard_unwind_frame ("lastpipe-exec");
41 Index: b/bash/patchlevel.h
42 ===================================================================
43 --- a/bash/patchlevel.h
44 +++ b/bash/patchlevel.h
46 regexp `^#define[ ]*PATCHLEVEL', since that's what support/mkversion.sh
47 looks for to find the patch level (for the sccs version string). */
49 -#define PATCHLEVEL 25
50 +#define PATCHLEVEL 26
52 #endif /* _PATCHLEVEL_H_ */