mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-01-19 11:31:26 +01: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>
|
||||
|
||||
* 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
|
||||
|
||||
* 48790: Src/Zle/compcore.c: COMPLETE_IN_WORD inside brace-param
|
||||
|
|
|
@ -906,6 +906,8 @@ getbyte(long do_keytmout, int *timeout, int full)
|
|||
continue;
|
||||
stopmsg = 1;
|
||||
zexit(1, ZEXIT_NORMAL);
|
||||
/* If called from an exit hook, zexit() returns, so: */
|
||||
break;
|
||||
}
|
||||
icnt = 0;
|
||||
if (errno == EINTR) {
|
||||
|
@ -929,6 +931,8 @@ getbyte(long do_keytmout, int *timeout, int full)
|
|||
zerr("error on TTY read: %e", errno);
|
||||
stopmsg = 1;
|
||||
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 */
|
||||
|
|
Loading…
Reference in a new issue