This bug has been copied from bug #615284 and has been proposed to be backported to 5.6 z-stream (EUS).
Technical note added. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. New Contents: When a ksh script contained the "trap" command to capture a "SIGPIPE" signal, sending this signal by using the built-in "echo" command could cause its output to be incorrectly added to the redirected output of an external command. This error has been fixed, and ksh now flushes the output buffer before redirecting output streams.
Bugfix was verified using scenarios from bz615284 on package ksh-20100202-1.el5_6.3.{i386, ia64, ppc, s390x, x86_64}. Output of built-in echo command no longer appears in redirect file.
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2011-0304.html