mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-03-09 15:50:02 +00:00
This fixes the following: trap ':' DEBUG r=$(exit 123) echo $? # Expected 123, but actually 0. Thanks to Koichi Nakashima for the report and reproducer. src/cmd/ksh93/sh/fault.c: sh_trap(): - Restore the saved current exit status (exitval) for all traps. Do not except the DEBUG trap from doing that. I've no idea why this exception was made, but it's not correct. src/cmd/ksh93/tests/basic.sh: - Add tests. Makes progress on: https://github.com/ksh93/ksh/issues/155
35 lines
2.1 KiB
C
35 lines
2.1 KiB
C
/***********************************************************************
|
|
* *
|
|
* This software is part of the ast package *
|
|
* Copyright (c) 1982-2012 AT&T Intellectual Property *
|
|
* and is licensed under the *
|
|
* Eclipse Public License, Version 1.0 *
|
|
* by AT&T Intellectual Property *
|
|
* *
|
|
* A copy of the License is available at *
|
|
* http://www.eclipse.org/org/documents/epl-v10.html *
|
|
* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
|
|
* *
|
|
* Information and Software Systems Research *
|
|
* AT&T Research *
|
|
* Florham Park NJ *
|
|
* *
|
|
* David Korn <dgk@research.att.com> *
|
|
* *
|
|
***********************************************************************/
|
|
|
|
#define SH_RELEASE_FORK "93u+m" /* only change if you develop a new ksh93 fork */
|
|
#define SH_RELEASE_SVER "1.0.0-alpha" /* semantic version number: https://semver.org */
|
|
#define SH_RELEASE_DATE "2021-01-20" /* must be in this format for $((.sh.version)) */
|
|
|
|
/* Scripts sometimes field-split ${.sh.version}, so don't change amount of whitespace. */
|
|
/* Arithmetic $((.sh.version)) uses the last 10 chars, so the date must be at the end. */
|
|
#if _AST_ksh_release
|
|
# define SH_RELEASE SH_RELEASE_FORK "/" SH_RELEASE_SVER " " SH_RELEASE_DATE
|
|
#else
|
|
# ifdef _AST_git_commit
|
|
# define SH_RELEASE SH_RELEASE_FORK "/" SH_RELEASE_SVER "+" _AST_git_commit " " SH_RELEASE_DATE
|
|
# else
|
|
# define SH_RELEASE SH_RELEASE_FORK "/" SH_RELEASE_SVER "+dev " SH_RELEASE_DATE
|
|
# endif
|
|
#endif
|