Contents of /trunk/bash/patches/bash-3.0-read-builtin-pipe.patch
Parent Directory | Revision Log
Revision 144 -
(show annotations)
(download)
Tue May 8 20:06:05 2007 UTC (17 years, 4 months ago) by niro
File size: 689 byte(s)
Tue May 8 20:06:05 2007 UTC (17 years, 4 months ago) by niro
File size: 689 byte(s)
-import
1 | Description: |
2 | When using 'read -u 3' or the like, and the pipe-buf already contains |
3 | more than one line, the first line is returned, and bytes up to the next |
4 | multiple of 128 are skipped. |
5 | |
6 | http://lists.gnu.org/archive/html/bug-bash/2005-03/msg00168.html |
7 | http://lists.gnu.org/archive/html/bug-bash/2005-03/msg00173.html |
8 | http://bugs.gentoo.org/show_bug.cgi?id=87093 |
9 | |
10 | --- builtins/read.def |
11 | +++ builtins/read.def |
12 | @@ -276,7 +276,7 @@ |
13 | input_is_tty = isatty (fd); |
14 | if (input_is_tty == 0) |
15 | #ifndef __CYGWIN__ |
16 | - input_is_pipe = (lseek (0, 0L, SEEK_CUR) < 0) && (errno == ESPIPE); |
17 | + input_is_pipe = (lseek (fd, 0L, SEEK_CUR) < 0) && (errno == ESPIPE); |
18 | #else |
19 | input_is_pipe = 1; |
20 | #endif |