mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-02-13 19:52:20 +00:00
This commit fixes BUG_CSUBSTDO, which could break stdout inside of non-forking command substitutions. The breakage only occurred when stdout was closed outside of the command substitution and a file descriptor other than stdout was redirected in the command substitution (such as stderr). Thanks to the ast-open-history repo, I was able to identify and backport the bugfix from ksh93v- 2012-08-24. This backport may fix other bugs as well. On 93v- 2012-08-24 it fixed the regression below, though it was not triggered on 93u+(m). src/cmd/ksh93/tests/heredoc.sh 487 print foo > $tmp/foofile 488 x=$( $SHELL 2> /dev/null 'read <<< $(<'"$tmp"'/foofile) 2> /dev/null;print -r "$REPLY"') 489 [[ $x == foo ]] || err_exit '<<< $(<file) not working' src/cmd/ksh93/sh/io.c: sh_open(): - If the just-opened file descriptor exists in sftable and is flagged with SF_STRING (as in non-forking command substitutions, among other situations), then move the file descriptor to a number >= 10. src/cmd/ksh93/tests/io.sh: - Add a regression test for BUG_CSUBSTDO, adapted from the one in modernish.
30 lines
1.2 KiB
Text
30 lines
1.2 KiB
Text
TODO for AT&T ksh93, 93u+m bugfix branch
|
|
|
|
See the issue tracker:
|
|
https://github.com/ksh93/ksh/issues
|
|
|
|
______
|
|
Fix regression test failures:
|
|
|
|
- There are many regression test failures on NetBSD.
|
|
|
|
- There are some serious regression test failures on OpenBSD when ksh
|
|
is compiled with AST vmalloc disabled, so the system standard malloc(3)
|
|
is used. These probably represent real ksh93 bugs exposed by OpenBSD's
|
|
security hardening mechanisms.
|
|
|
|
______
|
|
Fix currently known bugs affecting shell scripting. These are identified by
|
|
their modernish IDs. For exact details, see code/comments in:
|
|
https://github.com/modernish/modernish/tree/0.16/lib/modernish/cap/
|
|
|
|
- BUG_BRACQUOT: shell quoting within bracket patterns has no effect. This
|
|
bug means the '-' retains it special meaning of 'character range', and an
|
|
initial ! (and, on some shells, ^) retains the meaning of negation, even
|
|
in quoted strings within bracket patterns, including quoted variables.
|
|
|
|
- BUG_IFSGLOBS: In glob pattern matching (as in case or parameter
|
|
substitution with # and %), if IFS starts with ? or * and the "$*"
|
|
parameter expansion inserts any IFS separator characters, those characters
|
|
are erroneously interpreted as wildcards when quoted "$*" is used as the
|
|
glob pattern.
|