1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-03-09 15:50:02 +00:00

bump internal libast version; various minor cleanups

These are minor things I accumulated over the last month or so.

Notable changes:

src/lib/libast/features/api,
src/lib/libast/misc/state.c,
src/lib/libast/comp/conf.tab,
src/cmd/ksh93/include/defs.h:
- Bump internal libast version to 20220101L. We've made a few
  additions to the API, at least pathicase (see 71934570, ca3ec200)
  and astconf_long (see c2ac69b2), so this should have been done
  already. This also updates '/opt/ast/bin/getconf _AST_VERSION'.
- Use AST_VERSION instead of outdated _AST_VERSION.
- In state.c, use AST_VERSION instead of hardcoding the version.

src/cmd/ksh93/sh/xec.c:
- Remove 'restorefd' variable, unused as of 42becab6.
- Remove 'cmdrecurse' function and SH_RUNPROG macro; this was once
  used by a few libcmd commands, but ast-open-archive reveals it's
  unused as of ast 1999-12-25.

src/cmd/ksh93/sh/*.c:
- Where available, use e_dot instead of "." for consistency; it is
  defined as an extern so we might as well use it.

src/cmd/ksh93/tests/*.sh:
- When reporting signal names in fails, include the SIG prefix.
- Fix a broken process hang test in subshell.sh.

src/lib/libast/man/sfdisc.3:
- Removed. The interfaces described here never made it out of AT&T;
  they do not exist in any libast version in ast-open-archive.
  Resolves: https://github.com/ksh93/ksh/issues/426
This commit is contained in:
Martijn Dekker 2022-01-14 16:56:41 +00:00
parent 07fc64f52b
commit e569f23ef9
25 changed files with 58 additions and 300 deletions

View file

@ -1052,7 +1052,7 @@ $SHELL -c '
exit $((errors + 1)) # a possible erroneous asynchronous fork would cause exit status 0
' unset_test "$@"
(((e = $?) == 1)) || err_exit "Failure in unsetting one or more special variables" \
"(exit status $e$( ((e>128)) && print -n / && kill -l "$e"))"
"(exit status $e$( ((e>128)) && print -n /SIG && kill -l "$e"))"
# ... unset in virtual subshell inside of nested function
$SHELL -c '
@ -1082,7 +1082,7 @@ $SHELL -c '
exit $((errors + 1)) # a possible erroneous asynchronous fork would cause exit status 0
' unset_subsh_fun_test "$@"
(((e = $?) == 1)) || err_exit "Unset of special variable(s) in a virtual subshell within a nested function fails" \
"(exit status $e$( ((e>128)) && print -n / && kill -l "$e"))"
"(exit status $e$( ((e>128)) && print -n /SIG && kill -l "$e"))"
# ... readonly in subshell
$SHELL -c '
@ -1106,7 +1106,7 @@ $SHELL -c '
exit $((errors + 1)) # a possible erroneous asynchronous fork would cause exit status 0
' readonly_test "$@"
(((e = $?) == 1)) || err_exit "Failure in making one or more special variables readonly in a subshell" \
"(exit status $e$( ((e>128)) && print -n / && kill -l "$e"))"
"(exit status $e$( ((e>128)) && print -n /SIG && kill -l "$e"))"
# ... subshell leak test
$SHELL -c '
@ -1123,7 +1123,7 @@ $SHELL -c '
exit $((errors + 1))
' subshell_leak_test "$@"
(((e = $?) == 1)) || err_exit "One or more special variables leak out of a subshell" \
"(exit status $e$( ((e>128)) && print -n / && kill -l "$e"))"
"(exit status $e$( ((e>128)) && print -n /SIG && kill -l "$e"))"
# ... upper/lowercase test
$SHELL -c '
@ -1159,7 +1159,7 @@ $SHELL -c '
exit $((errors + 1))
' changecase_test "$@"
(((e = $?) == 1)) || err_exit "typeset -l/-u doesn't work on special variables" \
"(exit status $e$( ((e>128)) && print -n / && kill -l "$e"))"
"(exit status $e$( ((e>128)) && print -n /SIG && kill -l "$e"))"
# ... unset followed by launching a forked subshell
$SHELL -c '
@ -1176,7 +1176,7 @@ $SHELL -c '
exit $?
' unset_to_fork_test "$@"
(((e = $?) == 1)) || err_exit "Failure in unsetting one or more special variables followed by launching forked subshell" \
"(exit status $e$( ((e>128)) && print -n / && kill -l "$e"))"
"(exit status $e$( ((e>128)) && print -n /SIG && kill -l "$e"))"
# ======
# ${.sh.pid} should be the forked subshell's PID