mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-10-27 16:50:58 +01:00
12121: stopmsg in precmd
This commit is contained in:
parent
0ddb4fb835
commit
43f3a58597
3 changed files with 23 additions and 6 deletions
14
Src/utils.c
14
Src/utils.c
|
|
@ -644,11 +644,16 @@ preprompt(void)
|
|||
/* If a shell function named "precmd" exists, *
|
||||
* then execute it. */
|
||||
if ((prog = getshfunc("precmd")) != &dummy_eprog) {
|
||||
int osc = sfcontext;
|
||||
/*
|
||||
* Save stopmsg, since user doesn't get a chance to respond
|
||||
* to a list of jobs generated in precmd.
|
||||
*/
|
||||
int osc = sfcontext, osm = stopmsg;
|
||||
|
||||
sfcontext = SFC_HOOK;
|
||||
doshfunc("precmd", prog, NULL, 0, 1);
|
||||
sfcontext = osc;
|
||||
stopmsg = osm;
|
||||
}
|
||||
if (errflag)
|
||||
return;
|
||||
|
|
@ -1316,12 +1321,13 @@ read_poll(int fd, int *readchar, int polltty)
|
|||
int ret = 0;
|
||||
long mode = -1;
|
||||
char c;
|
||||
#ifdef FIONREAD
|
||||
int val;
|
||||
#endif
|
||||
#ifdef HAVE_SELECT
|
||||
fd_set foofd;
|
||||
struct timeval expire_tv;
|
||||
#else
|
||||
#ifdef FIONREAD
|
||||
int val;
|
||||
#endif
|
||||
#endif
|
||||
#ifdef HAS_TIO
|
||||
struct ttyinfo ti;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue