From 5ef61a44b12773eccd5de43acb18118eca09de29 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Wed, 5 Jun 2002 14:57:05 +0000 Subject: 17265: make the jobs command work in subshells --- Src/exec.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Src/exec.c') 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; } -- cgit v1.2.3