fix too strict fix for LP#1104543 (Debian #700526)

This commit is contained in:
tg 2013-02-15 18:50:14 +00:00
parent 12f0ff60d2
commit ec883318d1
3 changed files with 19 additions and 7 deletions

18
check.t
View File

@ -1,4 +1,4 @@
# $MirOS: src/bin/mksh/check.t,v 1.593 2013/02/11 13:06:54 tg Exp $
# $MirOS: src/bin/mksh/check.t,v 1.594 2013/02/15 18:50:11 tg Exp $
# $OpenBSD: bksl-nl.t,v 1.2 2001/01/28 23:04:56 niklas Exp $
# $OpenBSD: history.t,v 1.5 2001/01/28 23:04:56 niklas Exp $
# $OpenBSD: read.t,v 1.3 2003/03/10 03:48:16 david Exp $
@ -29,7 +29,7 @@
# http://www.freebsd.org/cgi/cvsweb.cgi/src/tools/regression/bin/test/regress.sh?rev=HEAD
expected-stdout:
@(#)MIRBSD KSH R42 2013/02/10
@(#)MIRBSD KSH R42 2013/02/15
description:
Check version of shell.
stdin:
@ -38,7 +38,7 @@ name: KSH_VERSION
category: shell:legacy-no
---
expected-stdout:
@(#)LEGACY KSH R42 2013/02/10
@(#)LEGACY KSH R42 2013/02/15
description:
Check version of legacy shell.
stdin:
@ -5769,6 +5769,18 @@ expected-stdout:
x
expected-exit: 1
---
name: exit-err-8
description:
"set -e" regression (Debian #700526)
stdin:
set -e
_db_cmd() { return $1; }
db_input() { _db_cmd 30; }
db_go() { _db_cmd 0; }
db_input || :
db_go
exit 0
---
name: exit-enoent-1
description:
SUSv4 says that the shell should exit with 126/127 in some situations

4
exec.c
View File

@ -23,7 +23,7 @@
#include "sh.h"
__RCSID("$MirOS: src/bin/mksh/exec.c,v 1.114 2013/02/10 23:59:25 tg Exp $");
__RCSID("$MirOS: src/bin/mksh/exec.c,v 1.115 2013/02/15 18:50:13 tg Exp $");
#ifndef MKSH_DEFAULT_EXECSHELL
#define MKSH_DEFAULT_EXECSHELL "/bin/sh"
@ -748,7 +748,7 @@ comexec(struct op *t, struct tbl * volatile tp, const char **ap,
e->type = E_FUNC;
if (!(i = kshsetjmp(e->jbuf))) {
execute(tp->val.t, 0, NULL);
execute(tp->val.t, flags & XERROK, NULL);
i = LRETURN;
}
kshname = old_kshname;

4
sh.h
View File

@ -164,9 +164,9 @@
#endif
#ifdef EXTERN
__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.634 2013/02/10 23:59:28 tg Exp $");
__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.635 2013/02/15 18:50:14 tg Exp $");
#endif
#define MKSH_VERSION "R42 2013/02/10"
#define MKSH_VERSION "R42 2013/02/15"
/* arithmetic types: C implementation */
#if !HAVE_CAN_INTTYPES