diff options
author | pfg <pfg@FreeBSD.org> | 2012-07-06 16:43:56 +0000 |
---|---|---|
committer | pfg <pfg@FreeBSD.org> | 2012-07-06 16:43:56 +0000 |
commit | 14199a8fd5efcdf5ce7f371c2e51e9ec66c55c84 (patch) | |
tree | b618c2c0cafd1cf1bf31a47865616e1462e4e530 /lib/libedit/sig.c | |
parent | dd5db9f53d0baca67fc336d16a2f1f6cd5756f77 (diff) | |
download | FreeBSD-src-14199a8fd5efcdf5ce7f371c2e51e9ec66c55c84.zip FreeBSD-src-14199a8fd5efcdf5ce7f371c2e51e9ec66c55c84.tar.gz |
Fix issue resizing bin/sh
This partially reverts some changes from r237448 that are causing
breakage when resizing under bin/sh .
Reverted changes from NetBSD are:
Mar 10 20:46:15 2009 - editline.3 read.c
make el_gets set the count to -1 on error to distinguish between EOF and
error.
Feb 19 15:20:22 2009 - read.c sig.c sig.h
reset and redraw on sigcont. From Anon Ymous.
Feb 15 21:24:13 2009
don't restart on EINTR, instead return NULL immediately. From Anon Ymous
PR: 169603
Reported by: Peter Jeremy, David Shao
MFC after: 3 days
Diffstat (limited to 'lib/libedit/sig.c')
-rw-r--r-- | lib/libedit/sig.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/libedit/sig.c b/lib/libedit/sig.c index e48dbef..218a32e 100644 --- a/lib/libedit/sig.c +++ b/lib/libedit/sig.c @@ -29,7 +29,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $NetBSD: sig.c,v 1.15 2009/02/19 15:20:22 christos Exp $ + * $NetBSD: sig.c,v 1.14 2009/02/18 15:04:40 christos Exp $ */ #if !defined(lint) && !defined(SCCSID) @@ -73,8 +73,6 @@ sig_handler(int signo) (void) sigaddset(&nset, signo); (void) sigprocmask(SIG_BLOCK, &nset, &oset); - sel->el_signal->sig_no = signo; - switch (signo) { case SIGCONT: tty_rawmode(sel); @@ -160,12 +158,12 @@ sig_set(EditLine *el) struct sigaction osa, nsa; nsa.sa_handler = sig_handler; - nsa.sa_flags = 0; sigemptyset(&nsa.sa_mask); (void) sigprocmask(SIG_BLOCK, &el->el_signal->sig_set, &oset); for (i = 0; sighdl[i] != -1; i++) { + nsa.sa_flags = SIGINT ? 0 : SA_RESTART; /* This could happen if we get interrupted */ if (sigaction(sighdl[i], &nsa, &osa) != -1 && osa.sa_handler != sig_handler) |