mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-02 22:11:54 +02:00
users/26736: avoid infinite loop in getbyte from exit hook
This commit is contained in:
parent
cae7eb7684
commit
e4bd6dc818
2 changed files with 7 additions and 0 deletions
|
@ -1,5 +1,8 @@
|
||||||
2021-05-15 Bart Schaefer <schaefer@zsh.org>
|
2021-05-15 Bart Schaefer <schaefer@zsh.org>
|
||||||
|
|
||||||
|
* users/26736: Src/Zle/zle_main.c: avoid infinite loop in getbyte
|
||||||
|
when read -q is called from exit hook
|
||||||
|
|
||||||
* 48810: Test/C04funcdef.ztst: name clash in test for autoloading
|
* 48810: Test/C04funcdef.ztst: name clash in test for autoloading
|
||||||
|
|
||||||
* 48790: Src/Zle/compcore.c: COMPLETE_IN_WORD inside brace-param
|
* 48790: Src/Zle/compcore.c: COMPLETE_IN_WORD inside brace-param
|
||||||
|
|
|
@ -906,6 +906,8 @@ getbyte(long do_keytmout, int *timeout, int full)
|
||||||
continue;
|
continue;
|
||||||
stopmsg = 1;
|
stopmsg = 1;
|
||||||
zexit(1, ZEXIT_NORMAL);
|
zexit(1, ZEXIT_NORMAL);
|
||||||
|
/* If called from an exit hook, zexit() returns, so: */
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
icnt = 0;
|
icnt = 0;
|
||||||
if (errno == EINTR) {
|
if (errno == EINTR) {
|
||||||
|
@ -929,6 +931,8 @@ getbyte(long do_keytmout, int *timeout, int full)
|
||||||
zerr("error on TTY read: %e", errno);
|
zerr("error on TTY read: %e", errno);
|
||||||
stopmsg = 1;
|
stopmsg = 1;
|
||||||
zexit(1, ZEXIT_NORMAL);
|
zexit(1, ZEXIT_NORMAL);
|
||||||
|
/* If called from an exit hook, zexit() returns, so: */
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (cc == '\r') /* undo the exchange of \n and \r determined by */
|
if (cc == '\r') /* undo the exchange of \n and \r determined by */
|
||||||
|
|
Loading…
Reference in a new issue