mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-11 13:01:28 +02:00
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
2 changed files with 9 additions and 0 deletions
|
@ -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>
|
2018-05-02 Oliver Kiddle <okiddle@yahoo.co.uk>
|
||||||
|
|
||||||
* Eitan Adler: 42740: Completion/BSD/Command/_systat:
|
* Eitan Adler: 42740: Completion/BSD/Command/_systat:
|
||||||
|
|
|
@ -631,6 +631,8 @@ raw_getbyte(long do_keytmout, char *cptr)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (selret == 0) {
|
if (selret == 0) {
|
||||||
|
zlong save_lastval;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Nothing ready and no error, so we timed out.
|
* Nothing ready and no error, so we timed out.
|
||||||
*/
|
*/
|
||||||
|
@ -648,6 +650,7 @@ raw_getbyte(long do_keytmout, char *cptr)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ZTM_FUNC:
|
case ZTM_FUNC:
|
||||||
|
save_lastval = lastval;
|
||||||
while (firstnode(timedfns)) {
|
while (firstnode(timedfns)) {
|
||||||
Timedfn tfdat = (Timedfn)getdata(firstnode(timedfns));
|
Timedfn tfdat = (Timedfn)getdata(firstnode(timedfns));
|
||||||
/*
|
/*
|
||||||
|
@ -661,6 +664,7 @@ raw_getbyte(long do_keytmout, char *cptr)
|
||||||
break;
|
break;
|
||||||
tfdat->func();
|
tfdat->func();
|
||||||
}
|
}
|
||||||
|
lastval = save_lastval;
|
||||||
/* Function may have messed up the display */
|
/* Function may have messed up the display */
|
||||||
if (resetneeded)
|
if (resetneeded)
|
||||||
zrefresh();
|
zrefresh();
|
||||||
|
|
Loading…
Reference in a new issue