Bug 700732

Summary: printf builtin doesn't report errors properly
Product: Red Hat Enterprise Linux 5 Reporter: Miroslav Franc <mfranc>
Component: bashAssignee: Roman Rakus <rrakus>
Status: CLOSED WONTFIX QA Contact: BaseOS QE - Apps <qe-baseos-apps>
Severity: low Docs Contact:
Priority: low    
Version: 5.6CC: ohudlick, ovasik, prc, tsmetana
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 709071 (view as bug list) Environment:
Last Closed: 2013-03-12 14:30:41 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 709071    

Description Miroslav Franc 2011-04-29 09:00:19 UTC
Description of problem:
ssia


Version-Release number of selected component (if applicable):
bash-3.2-24.el5, bash-3.2-30.el5,...


How reproducible:
always


Steps to Reproduce:
1. printf "somethingsomething" > /dev/full
2. printf "something\nsomething" > /dev/full

  
Actual results:
$ printf "somethingsomething" > /dev/full ; echo $?
1
$ printf "something\nsomething" > /dev/full ; echo $?
-bash: printf: write error: No space left on device
1


Expected results:
$ printf "somethingsomething" > /dev/full ; echo $?
-bash: printf: write error: No space left on device
1
$ printf "something\nsomething" > /dev/full ; echo $?
-bash: printf: write error: No space left on device
1



Additional info:

* IMHO should be consistent with echo builtin (echo -ne)

* might be difference between line and block buffering, but I'm not an expert

* bash 4 on rhel6 and fc14 is broken another way
$ printf "somethingsomething" > /dev/full ; echo $?
-bash: printf: write error: No space left on device
1
$ printf "something\nsomething" > /dev/full ; echo $?
bash: printf: write error: No space left on device
bash: printf: write error: No space left on device
1

Comment 1 Roman Rakus 2011-04-29 12:55:50 UTC
Thanks for the report. Bash's printf has some problems with and without `\n'.

Comment 5 RHEL Program Management 2011-09-23 00:08:25 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated in the
current release, Red Hat is unfortunately unable to address this
request at this time. Red Hat invites you to ask your support
representative to propose this request, if appropriate and relevant,
in the next release of Red Hat Enterprise Linux.

Comment 6 Roman Rakus 2013-03-12 14:30:41 UTC
RHEL-5.10 (the next RHEL-5 minor release) is going to be the first production phase 2 [1] release of RHEL-5. Since phase 2 we'll be addressing only security and critical issues.

[1] https://access.redhat.com/support/policy/updates/errata/