Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closing file descriptors can affect capturing subcommand output #198

Closed
krader1961 opened this issue Dec 7, 2017 · 0 comments
Closed

Closing file descriptors can affect capturing subcommand output #198

krader1961 opened this issue Dec 7, 2017 · 0 comments
Assignees
Labels
Milestone

Comments

@krader1961
Copy link
Contributor

This was reported as rhbz#1116072. I'm copying it here for clarity because the original bug report (especially the test case) is wrong about several points. Also, the Redhat fix has multiple problems and only fixes the problem accidentally and even then only for the specific test case in rhbz#1116072 not other variations of that test case.

@krader1961 krader1961 added the bug label Dec 7, 2017
@krader1961 krader1961 added this to the next-minor milestone Dec 7, 2017
@krader1961 krader1961 self-assigned this Dec 7, 2017
citrus-it added a commit to citrus-it/ast that referenced this issue Dec 30, 2020
citrus-it added a commit to citrus-it/ast that referenced this issue Dec 30, 2020
citrus-it added a commit to citrus-it/ast that referenced this issue Jan 4, 2021
citrus-it added a commit to citrus-it/ast that referenced this issue Jan 4, 2021
citrus-it added a commit to citrus-it/ast that referenced this issue Jan 4, 2021
citrus-it added a commit to citrus-it/ast that referenced this issue Jan 5, 2021
citrus-it added a commit to citrus-it/ast that referenced this issue Jan 5, 2021
citrus-it added a commit to citrus-it/ast that referenced this issue Jan 8, 2021
citrus-it added a commit to citrus-it/ast that referenced this issue Jan 8, 2021
McDutchie added a commit to ksh93/ksh that referenced this issue Jan 8, 2021
This pulls a new version of sh_iosafefd() from:
https://github.com/oracle/solaris-userland/blob/master/components/ksh93/patches/285-30771135.patch

It was written by Kurtis Rader for ksh2020:
att#198
att#199
It is presumably better than the Red Hat version and also comes
with more regression test cases (although it still doesn't fix
modernish BUG_CSUBSTDO, which remains in the TODO file).

This commit does not go along with other peripheral changes from
that patch, i.e. a different name and location of this function.

src/cmd/ksh93/sh/io.c:
- Replace sh_iosafefd() as above.

src/cmd/ksh93/tests/subshell.sh:
- Add and tweak tests from the patch.
citrus-it added a commit to citrus-it/ast that referenced this issue Jan 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant