Bug 675128

Summary: wrong redirections with SIGPIPE traps
Product: Red Hat Enterprise Linux 5 Reporter: RHEL Program Management <pm-rhel>
Component: kshAssignee: Michal Hlavinka <mhlavink>
Status: CLOSED ERRATA QA Contact: BaseOS QE - Apps <qe-baseos-apps>
Severity: high Docs Contact:
Priority: high    
Version: 5.5CC: bnater, kvolny, mhlavink, ovasik, pm-eus, tsmetana, tumeya
Target Milestone: rcKeywords: ZStream
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
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.
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-02-28 09:52:15 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 615284    
Bug Blocks:    

Description RHEL Program Management 2011-02-04 12:24:59 UTC
This bug has been copied from bug #615284 and has been proposed
to be backported to 5.6 z-stream (EUS).

Comment 5 Jaromir Hradilek 2011-02-07 14:55:50 UTC
    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.

Comment 6 Branislav NĂ¡ter 2011-02-23 12:14:56 UTC
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.

Comment 7 errata-xmlrpc 2011-02-28 09:52:15 UTC
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