summaryrefslogtreecommitdiff
path: root/Src
diff options
context:
space:
mode:
authorBarton E. Schaefer <schaefer@zsh.org>2017-06-19 16:14:32 -0700
committerBarton E. Schaefer <schaefer@zsh.org>2017-06-19 16:14:32 -0700
commit9de905b22f7c9c57eef7021ea7737339e5d6d58e (patch)
treef287c7992872f194c46aa4ceee155992a984b334 /Src
parenta5ed661f256b424a2db60b9dbacadc94fe78d843 (diff)
downloadzsh-9de905b22f7c9c57eef7021ea7737339e5d6d58e.tar.gz
zsh-9de905b22f7c9c57eef7021ea7737339e5d6d58e.zip
41322: reduce number of changes in signal queuing/blocking state during shingetline() to improve read speed
Diffstat (limited to 'Src')
-rw-r--r--Src/input.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/Src/input.c b/Src/input.c
index 92abaec92..9787dedf6 100644
--- a/Src/input.c
+++ b/Src/input.c
@@ -144,9 +144,10 @@ shingetline(void)
int q = queue_signal_level();
p = buf;
+ winch_unblock();
+ dont_queue_signals();
for (;;) {
- winch_unblock();
- dont_queue_signals();
+ /* Can't fgets() here because we need to accept '\0' bytes */
do {
errno = 0;
c = fgetc(bshin);
@@ -176,7 +177,8 @@ shingetline(void)
ll += p - buf;
line[ll] = '\0';
p = buf;
- unqueue_signals();
+ winch_unblock();
+ dont_queue_signals();
}
}
}