mirror of
git://git.code.sf.net/p/zsh/code
synced 2024-06-06 15:26:04 +02:00
27131: allow MONITOR in subshell by not closing SHTTY
This commit is contained in:
parent
bdfebe3e32
commit
653d6a0dd9
|
@ -1,5 +1,9 @@
|
|||
2009-07-11 Peter Stephenson <p.w.stephenson@ntlworld.com>
|
||||
|
||||
* 27131: Src/exec.c, Src/jobs.c: tentative attempt to
|
||||
allow MONITOR option to be set in a subshell by not
|
||||
closing SHTTY.
|
||||
|
||||
* 27129: Src/exec.c, Src/init.c, Src/zsh.h,
|
||||
Test/A01grammar.ztst, Test/C04funcdef.ztst,
|
||||
Test/D08cmdsubst.ztst: fix 27126 so as not to break the
|
||||
|
@ -11967,5 +11971,5 @@
|
|||
|
||||
*****************************************************
|
||||
* This is used by the shell to define $ZSH_PATCHLEVEL
|
||||
* $Revision: 1.4737 $
|
||||
* $Revision: 1.4738 $
|
||||
*****************************************************
|
||||
|
|
|
@ -931,11 +931,7 @@ entersubsh(int flags)
|
|||
zsh_subshell++;
|
||||
if ((flags & ESUB_REVERTPGRP) && getpid() == mypgrp)
|
||||
release_pgrp();
|
||||
if (SHTTY != -1) {
|
||||
shout = NULL;
|
||||
zclose(SHTTY);
|
||||
SHTTY = -1;
|
||||
}
|
||||
shout = NULL;
|
||||
if (isset(MONITOR)) {
|
||||
signal_default(SIGTTOU);
|
||||
signal_default(SIGTTIN);
|
||||
|
|
|
@ -1307,7 +1307,8 @@ clearjobtab(int monitor)
|
|||
|
||||
if (monitor && oldmaxjob) {
|
||||
int sz = oldmaxjob * sizeof(struct job);
|
||||
DPUTS(oldjobtab != NULL, "BUG: saving job table twice\n");
|
||||
if (oldjobtab)
|
||||
free(oldjobtab);
|
||||
oldjobtab = (struct job *)zalloc(sz);
|
||||
memcpy(oldjobtab, jobtab, sz);
|
||||
|
||||
|
|
Loading…
Reference in New Issue