From 27cdd075c6dfa5faaf72f7e3f5202eb3b490a3bc Mon Sep 17 00:00:00 2001 From: tg Date: Sat, 11 Mar 2017 22:58:51 +0000 Subject: [PATCH] remove odd use of KEEPASN, I believe it really unnecessary now --- exec.c | 8 +++----- main.c | 10 ++++------ 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/exec.c b/exec.c index 0a7ac0b..a99a3c7 100644 --- a/exec.c +++ b/exec.c @@ -2,7 +2,7 @@ /*- * Copyright (c) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, - * 2011, 2012, 2013, 2014, 2015, 2016 + * 2011, 2012, 2013, 2014, 2015, 2016, 2017 * mirabilos * * Provided that these terms and disclaimer and all copyright notices @@ -23,7 +23,7 @@ #include "sh.h" -__RCSID("$MirOS: src/bin/mksh/exec.c,v 1.187 2016/11/12 03:54:48 tg Exp $"); +__RCSID("$MirOS: src/bin/mksh/exec.c,v 1.188 2017/03/11 22:58:51 tg Exp $"); #ifndef MKSH_DEFAULT_EXECSHELL #define MKSH_DEFAULT_EXECSHELL MKSH_UNIXROOT "/bin/sh" @@ -1319,9 +1319,7 @@ call_builtin(struct tbl *tp, const char **wp, const char *where, bool resetspec) if (!tp) internal_errorf(Tf_sD_s, where, wp[0]); builtin_argv0 = wp[0]; - builtin_spec = tobool(!resetspec && - /*XXX odd use of KEEPASN */ - ((tp->flag & SPEC_BI) || (Flag(FPOSIX) && (tp->flag & KEEPASN)))); + builtin_spec = tobool(!resetspec && (tp->flag & SPEC_BI)); shf_reopen(1, SHF_WR, shl_stdout); shl_stdout_ok = true; ksh_getopt_reset(&builtin_opt, GF_ERROR); diff --git a/main.c b/main.c index ebbadd9..8701ab2 100644 --- a/main.c +++ b/main.c @@ -5,7 +5,7 @@ /*- * Copyright (c) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, - * 2011, 2012, 2013, 2014, 2015, 2016 + * 2011, 2012, 2013, 2014, 2015, 2016, 2017 * mirabilos * * Provided that these terms and disclaimer and all copyright notices @@ -34,7 +34,7 @@ #include #endif -__RCSID("$MirOS: src/bin/mksh/main.c,v 1.322 2016/11/11 23:48:30 tg Exp $"); +__RCSID("$MirOS: src/bin/mksh/main.c,v 1.323 2017/03/11 22:58:51 tg Exp $"); extern char **environ; @@ -1271,12 +1271,10 @@ bi_errorf(const char *fmt, ...) VWARNINGF_BUILTIN, fmt, va); va_end(va); - /* - * POSIX special builtins and ksh special builtins cause - * non-interactive shells to exit. XXX may not want LERROR here - */ + /* POSIX special builtins cause non-interactive shells to exit */ if (builtin_spec) { builtin_argv0 = NULL; + /* may not want to use LERROR here */ unwind(LERROR); } }