View Issue Details

IDProjectCategoryView StatusLast Update
00009071003.1(2013)/Issue7+TC1Shell and Utilitiespublic2019-06-10 08:54
Reporterjoerg Assigned To 
PrioritynormalSeverityEditorialTypeClarification Requested
Status ClosedResolutionAccepted As Marked 
NameJörg Schilling
Organization
User Reference
Sectiondd
Page Number2607
Line Number84604
Interp StatusApproved
Final Accepted Text0000907:0002608
Summary0000907: dd behavior for count= parameter is underspecified
Descriptionmost dd implementations behave as if there was no count= parameter
in case that count=0 was specified.
Desired ActionMake the behavior for count=0 unspecified.

On page 2607, line 84604 change:

count=n Copy only n input blocks.

to:

count=n Copy only n input blocks. The behavior is unspecified when n is 0.
Tagstc2-2008

Activities

shware_systems

2015-01-13 06:24

reporter   bugnote:0002523

While not explicit at that point in the text, it appears the specified behavior is to print the status lines in the STDERR section and return EXIT_SUCCESS, as it is always possible to process 0 blocks. What is missing more, to me, is whether an attempt at opening the if= or of= files should be done when the implied "do nothing" of count=0 is found, possibly causing a different exit code if they are not accessible, and whether an output file should be truncated as described under STDOUT and Output Files sections. Also, if EOF is reached before a count=1 or higher blocks have been processed, is this considered an insufficient data error or similar to seek larger than file size? As these relate to possible unexpected data loss if implementations differ, it seems leaving it unspecified not the way to go.

joerg

2015-01-13 10:42

reporter   bugnote:0002524

You seem to miss the point as you seem to believe that count=0 means
do nothing.

This is in conflict with all dd implementations that have a historic base.

As the general rule for POSIX is not to invalidate historic implementations
in special if this is related to corner cases, it seems to be a bug in POSIX
that there is no explanation that allows to understand count=0 as infinity.

geoffclare

2015-03-26 16:00

manager   bugnote:0002608

Last edited: 2015-03-27 10:55

Interpretation response
------------------------
The standard states the requirements for the count=n operand, and
conforming implementations must conform to this. However, concerns
have been raised about this which are being referred to the sponsor.

Rationale:
-------------
There are two existing implementation behaviors and the standard only allows
one of them.

Notes to the Editor (not part of this interpretation):
-------------------------------------------------------

On page 2607, line 84604 change:

count=n Copy only n input blocks.

to:

count=n Copy only n input blocks. If n is zero, it is unspecified whether no blocks or all blocks are copied.

ajosey

2015-04-17 09:52

manager   bugnote:0002628

Interpretation Proposed: 17 April 2015

ajosey

2015-05-18 09:06

manager   bugnote:0002670

Interpretation Approved: 18 May 2015

Issue History

Date Modified Username Field Change
2014-12-18 10:42 joerg New Issue
2014-12-18 10:42 joerg Name => Jörg Schilling
2014-12-18 10:42 joerg Section => dd
2014-12-18 10:42 joerg Page Number => 2607
2014-12-18 10:42 joerg Line Number => 84604
2015-01-13 06:24 shware_systems Note Added: 0002523
2015-01-13 10:42 joerg Note Added: 0002524
2015-03-26 16:00 geoffclare Note Added: 0002608
2015-03-26 16:01 geoffclare Interp Status => Pending
2015-03-26 16:01 geoffclare Final Accepted Text => 0000907:0002608
2015-03-26 16:01 geoffclare Status New => Interpretation Required
2015-03-26 16:01 geoffclare Resolution Open => Accepted As Marked
2015-03-26 16:02 geoffclare Tag Attached: tc2-2008
2015-03-27 10:55 geoffclare Note Edited: 0002608
2015-04-17 09:52 ajosey Interp Status Pending => Proposed
2015-04-17 09:52 ajosey Note Added: 0002628
2015-05-18 09:06 ajosey Interp Status Proposed => Approved
2015-05-18 09:06 ajosey Note Added: 0002670
2019-06-10 08:54 agadmin Status Interpretation Required => Closed