fix running the ERR and EXIT traps in case of set -e and/or eval (includes Debian #696823)

This commit is contained in:
tg
2013-01-01 20:45:04 +00:00
parent 0700d45ce6
commit 744f77c668
5 changed files with 130 additions and 20 deletions

View File

@ -5,7 +5,7 @@
/*-
* Copyright (c) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
* 2010, 2011, 2012
* 2010, 2011, 2012, 2013
* Thorsten Glaser <tg@mirbsd.org>
*
* Provided that these terms and disclaimer and all copyright notices
@ -38,7 +38,7 @@
#endif
#endif
__RCSID("$MirOS: src/bin/mksh/funcs.c,v 1.236 2012/12/28 02:28:34 tg Exp $");
__RCSID("$MirOS: src/bin/mksh/funcs.c,v 1.237 2013/01/01 20:45:02 tg Exp $");
#if HAVE_KILLPG
/*
@ -2216,7 +2216,7 @@ c_eval(const char **wp)
exstat |= 0x4000;
savef = Flag(FERREXIT);
Flag(FERREXIT) = 0;
Flag(FERREXIT) |= 0x80;
rv = shell(s, false);
Flag(FERREXIT) = savef;
source = saves;