about summary refs log tree commit diff
path: root/Src/input.c
diff options
context:
space:
mode:
authorBart Schaefer <schaefer@zsh.org>2013-04-28 17:47:43 -0700
committerBart Schaefer <schaefer@zsh.org>2013-04-30 00:08:49 -0700
commitd19e18c68d6415214afad37ce6cb47ec038ebe1c (patch)
treec325d0ca0440246d07b758c25a20d6c5f49356b4 /Src/input.c
parentcbf6f144a942a3db27025e68357b9fd8ca442ed8 (diff)
downloadzsh-d19e18c68d6415214afad37ce6cb47ec038ebe1c.tar.gz
zsh-d19e18c68d6415214afad37ce6cb47ec038ebe1c.tar.xz
zsh-d19e18c68d6415214afad37ce6cb47ec038ebe1c.zip
31350: block SIGWINCH nearly all the time, except
when about to calculate prompts or do synchronous read, so
syscalls are not interrupted by window size changes.
Diffstat (limited to 'Src/input.c')
-rw-r--r--Src/input.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/Src/input.c b/Src/input.c
index 5cff22da4..9bd9663bf 100644
--- a/Src/input.c
+++ b/Src/input.c
@@ -143,10 +143,12 @@ shingetline(void)
 
     p = buf;
     for (;;) {
+	winch_unblock();
 	do {
 	    errno = 0;
 	    c = fgetc(bshin);
 	} while (c < 0 && errno == EINTR);
+	winch_block();
 	if (c < 0 || c == '\n') {
 	    if (c == '\n')
 		*p++ = '\n';