remove odd use of KEEPASN, I believe it really unnecessary now
This commit is contained in:
parent
bc4397e28a
commit
27cdd075c6
8
exec.c
8
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 <m@mirbsd.org>
|
||||
*
|
||||
* 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);
|
||||
|
10
main.c
10
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 <m@mirbsd.org>
|
||||
*
|
||||
* Provided that these terms and disclaimer and all copyright notices
|
||||
@ -34,7 +34,7 @@
|
||||
#include <locale.h>
|
||||
#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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user