summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
Diffstat (limited to 'Src')
-rw-r--r--Src/options.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/Src/options.c b/Src/options.c
index 7223b1d59..139926428 100644
--- a/Src/options.c
+++ b/Src/options.c
@@ -647,6 +647,9 @@ dosetopt(int optno, int value, int force)
 	    for (s = rparams; *s; s++)
 		restrictparam(*s);
 	}
+    } else if(!force && optno == EXECOPT && !value && interact) {
+	/* cannot set noexec when interactive */
+	return -1;
     } else if(!force && (optno == INTERACTIVE || optno == SHINSTDIN ||
 	    optno == SINGLECOMMAND)) {
 	if (opts[optno] == value)