Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libedit retry the read after sigwinch too, from Edward S...



details:   https://anonhg.NetBSD.org/src/rev/ca00bb20df08
branches:  trunk
changeset: 756494:ca00bb20df08
user:      christos <christos%NetBSD.org@localhost>
date:      Mon Jul 19 17:18:13 2010 +0000

description:
retry the read after sigwinch too, from Edward Sheldrake

diffstat:

 lib/libedit/read.c |  10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diffs (34 lines):

diff -r b58b949ce5c5 -r ca00bb20df08 lib/libedit/read.c
--- a/lib/libedit/read.c        Mon Jul 19 16:32:01 2010 +0000
+++ b/lib/libedit/read.c        Mon Jul 19 17:18:13 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: read.c,v 1.55 2010/03/22 22:59:06 christos Exp $       */
+/*     $NetBSD: read.c,v 1.56 2010/07/19 17:18:13 christos Exp $       */
 
 /*-
  * Copyright (c) 1992, 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = "@(#)read.c     8.1 (Berkeley) 6/4/93";
 #else
-__RCSID("$NetBSD: read.c,v 1.55 2010/03/22 22:59:06 christos Exp $");
+__RCSID("$NetBSD: read.c,v 1.56 2010/07/19 17:18:13 christos Exp $");
 #endif
 #endif /* not lint && not SCCSID */
 
@@ -321,10 +321,14 @@
  again:
        el->el_signal->sig_no = 0;
        while ((num_read = read(el->el_infd, cbuf + cbp, 1)) == -1) {
-               if (el->el_signal->sig_no == SIGCONT) {
+               switch (el->el_signal->sig_no) {
+               case SIGCONT:
+               case SIGWINCH:
                        sig_set(el);
                        el_set(el, EL_REFRESH);
                        goto again;
+               default:
+                       break;
                }
                if (!tried && read__fixio(el->el_infd, errno) == 0)
                        tried = 1;



Home | Main Index | Thread Index | Old Index