On 25 Nov, Blazej Krzeminski wrote: > Traps set inside KSH functions and 'set -e' (exit on error) command > are ignored when the function is used in a command substitution > and the command substitution $( ) is contained in a || or && command, > or is following an 'if'. This problem does not occur in pdksh.
This is intended behaviour. ksh is following the POSIX standard here whereas pdksh is not. Conditionals such as || && and if are would be useless together with set -e if the trap were triggered. So the standard says that set -e is not honored during conditonals like if, && and ||. The fact that it occurs inside a function and with command substitution makes no difference. Oliver -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org