about summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2009-07-11 19:06:51 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2009-07-11 19:06:51 +0000
commit653d6a0dd95668eb3ad0d92de985cf14c1f65a8d (patch)
treea79fc23a381e8103056906581334b474da9c30ab /Src
parentbdfebe3e3262eaaf83e89c9356c7c46a21181a6a (diff)
downloadzsh-653d6a0dd95668eb3ad0d92de985cf14c1f65a8d.tar.gz
zsh-653d6a0dd95668eb3ad0d92de985cf14c1f65a8d.tar.xz
zsh-653d6a0dd95668eb3ad0d92de985cf14c1f65a8d.zip
27131: allow MONITOR in subshell by not closing SHTTY
Diffstat (limited to 'Src')
-rw-r--r--Src/exec.c6
-rw-r--r--Src/jobs.c3
2 files changed, 3 insertions, 6 deletions
diff --git a/Src/exec.c b/Src/exec.c
index 67d48b1ce..004459abf 100644
--- a/Src/exec.c
+++ b/Src/exec.c
@@ -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);
diff --git a/Src/jobs.c b/Src/jobs.c
index 6c673b74a..8e48ed4b8 100644
--- a/Src/jobs.c
+++ b/Src/jobs.c
@@ -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);