Bug 700732 - printf builtin doesn't report errors properly
Summary: printf builtin doesn't report errors properly
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: bash
Version: 5.6
Hardware: All
OS: Linux
low
low
Target Milestone: rc
: ---
Assignee: Roman Rakus
QA Contact: BaseOS QE - Apps
URL:
Whiteboard:
Depends On:
Blocks: 709071
TreeView+ depends on / blocked
 
Reported: 2011-04-29 09:00 UTC by Miroslav Franc
Modified: 2014-01-13 00:13 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 709071 (view as bug list)
Environment:
Last Closed: 2013-03-12 14:30:41 UTC
Target Upstream Version:


Attachments (Terms of Use)

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/


Note You need to log in before you can comment on or make changes to this bug.