diff options
-rw-r--r-- | ChangeLog | 10 | ||||
-rw-r--r-- | Src/builtin.c | 13 |
2 files changed, 19 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog index e8c439bd3..cf1bfc19b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2011-04-11 Peter Stephenson <pws@csr.com> + + * users/15953: Src/builtin.c: handle EINTR when using read -k or + -q together with -u or -p. + + * cat.in.136: users/15945: Completion/Redhat/Command/_yum: + various corrections and updates. + 2011-04-05 Wayne Davison <wayned@users.sourceforge.net> * 28977: Src/utils.c: fix copying of uninitialized memory @@ -14425,5 +14433,5 @@ ***************************************************** * This is used by the shell to define $ZSH_PATCHLEVEL -* $Revision: 1.5241 $ +* $Revision: 1.5242 $ ***************************************************** diff --git a/Src/builtin.c b/Src/builtin.c index cda5e68cb..127d58bdb 100644 --- a/Src/builtin.c +++ b/Src/builtin.c @@ -5291,9 +5291,16 @@ bin_read(char *name, char **args, Options ops, UNUSED(int func)) *bptr = readchar; val = 1; readchar = -1; - } else if ((val = read(readfd, bptr, nchars)) <= 0) { - eof = 1; - break; + } else { + while ((val = read(readfd, bptr, nchars)) < 0) { + if (errno != EINTR || + errflag || retflag || breaks || contflag) + break; + } + if (val <= 0) { + eof = 1; + break; + } } #ifdef MULTIBYTE_SUPPORT |