View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000907 | 1003.1(2013)/Issue7+TC1 | Shell and Utilities | public | 2014-12-18 10:42 | 2019-06-10 08:54 |
Reporter | joerg | Assigned To | |||
Priority | normal | Severity | Editorial | Type | Clarification Requested |
Status | Closed | Resolution | Accepted As Marked | ||
Name | Jörg Schilling | ||||
Organization | |||||
User Reference | |||||
Section | dd | ||||
Page Number | 2607 | ||||
Line Number | 84604 | ||||
Interp Status | Approved | ||||
Final Accepted Text | 0000907:0002608 | ||||
Summary | 0000907: dd behavior for count= parameter is underspecified | ||||
Description | most dd implementations behave as if there was no count= parameter in case that count=0 was specified. | ||||
Desired Action | Make 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. | ||||
Tags | tc2-2008 |
|
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. |
|
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. |
|
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. |
|
Interpretation Proposed: 17 April 2015 |
|
Interpretation Approved: 18 May 2015 |
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 |