1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-10-13 23:31:08 +02:00

12121: stopmsg in precmd

This commit is contained in:
Peter Stephenson 2000-07-03 08:48:22 +00:00
parent 0ddb4fb835
commit 43f3a58597
3 changed files with 23 additions and 6 deletions

View file

@ -1,3 +1,8 @@
2000-07-03 Peter Stephenson <pws@cambridgesiliconradio.com>
* 12121: Src/utils.c, Doc/Zsh/options.yo: save and restore stopmsg
for precmd, fix #ifdef's for variable declaration in read_poll().
2000-07-03 Sven Wischnowsky <wischnow@zsh.org>
* 12134: Completion/Core/_main_complete, Doc/Zsh/compsys.yo,

View file

@ -244,8 +244,14 @@ cindex(exiting, checking jobs when)
cindex(logging out, checking jobs when)
item(tt(CHECK_JOBS) <Z>)(
Report the status of background and suspended jobs before exiting a shell
with job control. tt(NO_CHECK_JOBS) is best used only in combination with
tt(NO_HUP), else such jobs will be killed automatically.
with job control; a second attempt to exit the shell will succeed.
tt(NO_CHECK_JOBS) is best used only in combination with tt(NO_HUP), else
such jobs will be killed automatically.
The check is omitted if the commands run from the previous command line
included a `tt(jobs)' command, since it is assumed the user is aware that
there are background or suspended jobs. A `tt(jobs)' command run from the
tt(precmd) function is not counted for this purpose.
)
pindex(CLOBBER)
cindex(clobbering, of files)

View file

@ -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;