mirror of git://git.code.sf.net/p/zsh/code
42751: Protect shell status in ZLE timed function handler.
Otherwise status from sched and other asynchronous functions could escape back to the main shell.
This commit is contained in:
parent
942ac7e6e2
commit
c8ceb66ba3
|
@ -1,3 +1,8 @@
|
|||
2018-05-08 Peter Stephenson <p.stephenson@samsung.com>
|
||||
|
||||
* 42751: Src/Zle/zle_main.c: Protect shell status around
|
||||
time function execution in line editor.
|
||||
|
||||
2018-05-02 Oliver Kiddle <okiddle@yahoo.co.uk>
|
||||
|
||||
* Eitan Adler: 42740: Completion/BSD/Command/_systat:
|
||||
|
|
|
@ -631,6 +631,8 @@ raw_getbyte(long do_keytmout, char *cptr)
|
|||
continue;
|
||||
}
|
||||
if (selret == 0) {
|
||||
zlong save_lastval;
|
||||
|
||||
/*
|
||||
* Nothing ready and no error, so we timed out.
|
||||
*/
|
||||
|
@ -648,6 +650,7 @@ raw_getbyte(long do_keytmout, char *cptr)
|
|||
break;
|
||||
|
||||
case ZTM_FUNC:
|
||||
save_lastval = lastval;
|
||||
while (firstnode(timedfns)) {
|
||||
Timedfn tfdat = (Timedfn)getdata(firstnode(timedfns));
|
||||
/*
|
||||
|
@ -661,6 +664,7 @@ raw_getbyte(long do_keytmout, char *cptr)
|
|||
break;
|
||||
tfdat->func();
|
||||
}
|
||||
lastval = save_lastval;
|
||||
/* Function may have messed up the display */
|
||||
if (resetneeded)
|
||||
zrefresh();
|
||||
|
|
Loading…
Reference in New Issue