summaryrefslogtreecommitdiff
path: root/Src/subst.c
diff options
context:
space:
mode:
Diffstat (limited to 'Src/subst.c')
-rw-r--r--Src/subst.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/Src/subst.c b/Src/subst.c
index 06e16c183..5e41beff1 100644
--- a/Src/subst.c
+++ b/Src/subst.c
@@ -2591,8 +2591,17 @@ paramsubst(LinkList l, LinkNode n, char **str, int qt, int ssub)
if (vunset) {
*idend = '\0';
zerr("%s: %s", idbeg, *s ? s : "parameter not set");
- if (!interact)
- exit(1);
+ if (!interact) {
+ if (mypid == getpid()) {
+ /*
+ * paranoia: don't check for jobs, but there shouldn't
+ * be any if not interactive.
+ */
+ stopmsg = 1;
+ zexit(1, 0);
+ } else
+ _exit(1);
+ }
return NULL;
}
break;