1.168. mksh

An updated mksh package that fixes three bugs and adds one enhancement is now available for Red Hat Enterprise Linux 6.
The mksh package provides the MirBSD version of the Korn Shell which implements the ksh-88 programming language for both interactive and shell script use.
Bug Fixes
Previously, mksh did not handle trace output correctly. Due to this problem, mksh aborted unexpectedly when the tracing was enabled and a long string was to be reported, This update improves the long trace output handling. Now, long trace output is successfully printed without interruption.
Previously, mksh did not handle aliases that contained aliases correctly. Due to this problem, mksh aborted when double aliases were used. This update corrects the alias handling code. Double aliases are handled as expected.
Previously, bad substitution could abort mksh unexpectedly because of a conflict between acceptable code for ksh-88 and ksh-93. This update recognizes both code types and prints errors as expected.
Previously, users had to change the shebang in their ksh-88 scripts or port their scripts to ksh-93. This update adds the "alternatives" switching method that allows to switch between ksh-93 provided by the ksh package and ksh-88 provided by the mksh package for /bin/ksh. Now, users can apply their scripts without modification or porting them to ksh-93 one by one.
All users of mksh are advised to upgrade to this updated package, which fixes these bugs and adds this enhancement.
An updated ksh package that fixes several bugs and adds various enhancements is now available.
KSH-93 is the most recent version of the KornShell by David Korn of AT&T Bell Laboratories -- a shell programming language upwards-compatible with "sh" (the Bourne Shell).
This updated ksh package provides fixes for the following bugs:

Bug Fixes

When a ksh script contained the "trap" command to capture a "SIGPIPE" signal, sending this signal via the built-in "echo" command could cause its output to be incorrectly added to the redirected output of an external command. With this update, ksh now flushes the output buffer before redirecting any output streams.
Due to incorrect signal handling, receiving a signal while still processing the same one caused ksh to terminate unexpectedly with a segmentation fault. With this update, the subsequent signals are deferred until the current one is processed; thus, ksh no longer crashes.
The previous version of the ksh man page contained an unavailable "-m" option and an insufficient description of the "-R" option. In this updated version of the man page, the section mentioning the unavailable option is removed and the description of the "-R" option is extended.
Assigning a value to an array variable during the execution of the "typeset" command could cause ksh to terminate unexpectedly with a segmentation fault. This update corrects the array handling in this command and ksh no longer crashes.
Prior to this update, ksh did not close a file containing an auto-loaded function definition. After loading several functions, ksh could have easily exceeded the system's limit on the number of open files. With this update, files containing auto-loaded functions are properly closed, thus, the number of opened files no longer increases with usage.
If a here document (heredoc — specifies a string literal in command line shells) was combined with an auto-loaded function, interference with the here document processing could occur causing output to be truncated to 8 kB. This update improves the here document processing logic and auto-loaded functions no longer have a negative side effect on here documents.
Previously, ksh did not restore file handles after executing a sourced script. If an output stream or an error stream was redirected in the sourced script, the respective stream remained redirected in the parent script as well. With this update, file handles are restored after execution of sourced scripts so a parent script is not affected by sourced script redirections.
Previously, a ( ) compound list did not always use a copy of the environment which caused the original environment to be altered. Scripts could behave unexpectedly because their variables could be changed. With this update, a copy of the environment is always used for a ( ) compound list; thus, the original environment is not affected by commands from the ( ) compound list.


The ksh built-in "ulimit" command now provides the ability to read and set the "RLIMIT_RTPRIO" and "RLIMIT_NICE" resource limiters.
The ksh package now includes an "alternatives" command which allows ksh to be switched with mksh (MirBSD Korn Shell). This enhancement allows users to switch between the ksh-93 and ksh-88 (provided by mksh) shells and to port ksh-88 scripts to ksh-93.
Users are advised to upgrade to this updated ksh package, which resolves these issues and adds these enhancements.