about summary refs log tree commit diff
path: root/Src/exec.c
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2002-06-05 14:57:05 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2002-06-05 14:57:05 +0000
commit5ef61a44b12773eccd5de43acb18118eca09de29 (patch)
treea64021870c673a272fad5cec118ff4fa0c565648 /Src/exec.c
parent5d010ca81a11d65fca5029644a349a2cd12f6c3b (diff)
downloadzsh-5ef61a44b12773eccd5de43acb18118eca09de29.tar.gz
zsh-5ef61a44b12773eccd5de43acb18118eca09de29.tar.xz
zsh-5ef61a44b12773eccd5de43acb18118eca09de29.zip
17265: make the jobs command work in subshells
Diffstat (limited to 'Src/exec.c')
-rw-r--r--Src/exec.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/Src/exec.c b/Src/exec.c
index d3b33e174..4888c9fb8 100644
--- a/Src/exec.c
+++ b/Src/exec.c
@@ -2507,13 +2507,13 @@ forklevel;
 static void
 entersubsh(int how, int cl, int fake)
 {
-    int sig;
+    int sig, monitor;
 
     if (cl != 2)
 	for (sig = 0; sig < VSIGCOUNT; sig++)
 	    if (!(sigtrapped[sig] & ZSIG_FUNC))
 		unsettrap(sig);
-    if (unset(MONITOR)) {
+    if (!(monitor = isset(MONITOR))) {
 	if (how & Z_ASYNC) {
 	    settrap(SIGINT, NULL);
 	    settrap(SIGQUIT, NULL);
@@ -2569,7 +2569,7 @@ entersubsh(int how, int cl, int fake)
     opts[MONITOR] = opts[USEZLE] = 0;
     zleactive = 0;
     if (cl)
-	clearjobtab();
+	clearjobtab(monitor);
     times(&shtms);
     forklevel = locallevel;
 }