-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add forking workaround for block stdout redir (re: e373e8c)
Reproducer: ok=$({ true >&2; } >&2; echo OK); echo $ok This should output "OK" but currently outputs nothing. Looks like the sh_subfork() workaround must also be implemented for the TSETIO case in sh_exec(), as that is where redirections for blocks and compound commands are handled. This avoids inconsistent behaviour that happens if sh_subfork() is called later for the inside redirection. src/cmd/ksh93/sh/xec.c: sh_exec(): case TSETIO: - Also fork if standard output redirections attached to blocks are executed within a non-subshare command substitution. Thanks to Vincent Mihalkovič (@vmihalko) for the report. Resolves: #784
- Loading branch information
Showing
4 changed files
with
48 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters