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,
|
* 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>
|
* mirabilos <m@mirbsd.org>
|
||||||
*
|
*
|
||||||
* Provided that these terms and disclaimer and all copyright notices
|
* Provided that these terms and disclaimer and all copyright notices
|
||||||
@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
#include "sh.h"
|
#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
|
#ifndef MKSH_DEFAULT_EXECSHELL
|
||||||
#define MKSH_DEFAULT_EXECSHELL MKSH_UNIXROOT "/bin/sh"
|
#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)
|
if (!tp)
|
||||||
internal_errorf(Tf_sD_s, where, wp[0]);
|
internal_errorf(Tf_sD_s, where, wp[0]);
|
||||||
builtin_argv0 = wp[0];
|
builtin_argv0 = wp[0];
|
||||||
builtin_spec = tobool(!resetspec &&
|
builtin_spec = tobool(!resetspec && (tp->flag & SPEC_BI));
|
||||||
/*XXX odd use of KEEPASN */
|
|
||||||
((tp->flag & SPEC_BI) || (Flag(FPOSIX) && (tp->flag & KEEPASN))));
|
|
||||||
shf_reopen(1, SHF_WR, shl_stdout);
|
shf_reopen(1, SHF_WR, shl_stdout);
|
||||||
shl_stdout_ok = true;
|
shl_stdout_ok = true;
|
||||||
ksh_getopt_reset(&builtin_opt, GF_ERROR);
|
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,
|
* 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>
|
* mirabilos <m@mirbsd.org>
|
||||||
*
|
*
|
||||||
* Provided that these terms and disclaimer and all copyright notices
|
* Provided that these terms and disclaimer and all copyright notices
|
||||||
@ -34,7 +34,7 @@
|
|||||||
#include <locale.h>
|
#include <locale.h>
|
||||||
#endif
|
#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;
|
extern char **environ;
|
||||||
|
|
||||||
@ -1271,12 +1271,10 @@ bi_errorf(const char *fmt, ...)
|
|||||||
VWARNINGF_BUILTIN, fmt, va);
|
VWARNINGF_BUILTIN, fmt, va);
|
||||||
va_end(va);
|
va_end(va);
|
||||||
|
|
||||||
/*
|
/* POSIX special builtins cause non-interactive shells to exit */
|
||||||
* POSIX special builtins and ksh special builtins cause
|
|
||||||
* non-interactive shells to exit. XXX may not want LERROR here
|
|
||||||
*/
|
|
||||||
if (builtin_spec) {
|
if (builtin_spec) {
|
||||||
builtin_argv0 = NULL;
|
builtin_argv0 = NULL;
|
||||||
|
/* may not want to use LERROR here */
|
||||||
unwind(LERROR);
|
unwind(LERROR);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user