Product SiteDocumentation Site

1.113.  ksh

1.113.1.  RHBA-2009:1165: bug fix update

Note

This update has already been released (prior to the GA of this release) as errata RHBA-2009:1165
An updated ksh package that fixes a bug is now available.
KSH-93 is the most recent version of the KornShell by David Korn of AT&T Bell Laboratories. KornShell is a shell programming language which is also compatible with "sh", the original Bourne Shell.
This updated ksh package fixes the following bug:
  • the ksh shell's "typeset" special builtin command allows scripts to perform nested variable assignment by providing a variable name and a value to assign to that variable name. However, when a ksh function which contained a nested variable was forked, the nesting counter was incorrectly set to zero, which caused nested variables assignments to become unset. This updated package corrects this error so that forked ksh functions have nested variables set correctly in their child processes, thus resolving the issue. (BZ#510712)
All users of ksh are advised to upgrade to this updated package, which resolves this issue.

1.113.2.  RHBA-2009:1256: bug fix update

Ksh package that fixes various bugs 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 includes fixes for the following bugs:
  • when umask set a default permission in a subshell, this default permission would persist after returning to the parent shell. Subsequently, files in the parent shell might have been created with wrong permissions. This is now fixed. (BZ#485030)
  • ksh removed variables from the environment if their names contained certain characters, for example, a hyphen or a space. Now, although ksh does not use environment variables with names that contain these characters, it keeps them for sub-processes. (BZ#488934)
  • the ksh builtins failed to report errors on failed file operations, for example, if they were unable to write to a file because of no space on a disk. This could result in data loss, because a user would have no warning that data was not saved. Builtins now provide a proper return code and present an error message to the user if they are unable to complete a file operation. (BZ#465438)
  • when typeset was used together with variable assignment in the last version of ksh, typeset took effect after the assignment, not before. Because this behavior was the opposite of how typeset works in ksh versions provided by pdksh and was not documented, it could create surprise and confusion. Now, ksh changed its behavior and typeset takes effect before the variable assignment. (BZ#489516)
  • the ksh package now includes 'alternatives' which allows ksh switching with PDKSH. This feature allows users to switch between the ksh-93 and ksh-88 shells and to port ksh-88 scripts to ksh-93. (BZ#488798)
  • ksh sometimes returned wrong OPTIND values after returning from a subshell when it executed a function within backquotes (backticks). While the original function would behave as expected, subseqeunt calls would result in incorrect OPTIND values, even calls made directly to the getopts function. Now, the use of backquotes does not cause ksh to return wrong OPTIND values on subsequent calls. (BZ#443889)
  • the COMPATIBILITY file which describes differences between ksh-88 and ksh-93 has been added to %doc. (BZ#494534)
  • if the $HISTFILE did not exist and could not be created for some reason (for example, read-only NFS home) ksh sometimes crashed with a segmentation fault when trying to insert the last word of the previous command using the M-_ or M-. keyboard shortcut. This is now fixed. (BZ#494363)
  • the last version of ksh replaced the ast-base-locale language catalog with a ksh-specific language catalog. However, the ksh-specific catalog lacks translations for many of the locales shipped with ksh. Attempts to use ksh with a non-English locale would therefore result in error messages. Ksh now reverts to using the previous catalog, which does not produce these errors. (BZ#493570)
  • in the last version of ksh, braces for a subscripted variable with ${var[sub]} became compulsory when inside [[...]], ((...)) or as a subscript. Because these braces were previouly optional, some shell scripts written for earlier versions of ksh no longer worked as expected. Ksh now recognises cases where the argument can be a pattern, and expands these variables the same way that it expanded them when the braces were optional. While this allows many old scripts to work in the current version of ksh, users cannot be certain that their scripts will work as expected unless they enclose variables in braces as defined in the ksh documentation. (BZ#498585)
  • ksh now allows command history to be saved in global history file or in system log. (BZ#502747)
  • in the last ksh version, the function nesting counter was zeroed after forking. Therefore, typeset did not assign values in asynchronously called functions. This is now fixed. (BZ#507562)
All users of ksh are advised to upgrade to this updated package, which resolves these issues.

Note: This documentation is provided {and copyrighted} by Red Hat®, Inc. and is released via the Open Publication License. The copyright holder has added the further requirement that Distribution of substantively modified versions of this document is prohibited without the explicit permission of the copyright holder. The CentOS project redistributes these original works (in their unmodified form) as a reference for CentOS-5 because CentOS-5 is built from publicly available, open source SRPMS. The documentation is unmodified to be compliant with upstream distribution policy. Neither CentOS-5 nor the CentOS Project are in any way affiliated with or sponsored by Red Hat®, Inc.