-
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.
Fix I/O redirection in -c script (Solaris patch 280-23332860)
This change is pulled from here: https://github.com/oracle/solaris-userland/blob/master/components/ksh93/patches/280-23332860.patch Info and reproducers: att#36 In a -c script (like ksh -c 'commands'), the last command misredirects standard output if an EXIT or ERR trap is set. This appears to be a side effect of the optimisation that runs the last command without forking. This applies a patch by George Lijo that flags these specific cases and disables the optimisation. src/cmd/ksh93/include/defs.h, src/cmd/ksh93/bltins/trap.c, src/cmd/ksh93/sh/init.c, src/cmd/ksh93/sh/main.c, src/cmd/ksh93/sh/xec.c: - Apply patch as above. src/cmd/ksh93/tests/io.sh: - Add the reproducers from the bug report as regression tests.
- Loading branch information
Showing
6 changed files
with
78 additions
and
1 deletion.
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
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