View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0001156 | 1003.1(2016/18)/Issue7+TC2 | System Interfaces | public | 2017-07-20 08:13 | 2019-01-14 16:57 |
Reporter | Florian Weimer | Assigned To | |||
Priority | normal | Severity | Editorial | Type | Clarification Requested |
Status | Closed | Resolution | Duplicate | ||
Name | Florian Weimer | ||||
Organization | Red Hat | ||||
User Reference | https://sourceware.org/bugzilla/show_bug.cgi?id=21735 | ||||
Section | fflush | ||||
Page Number | 859 | ||||
Line Number | 28961 | ||||
Interp Status | --- | ||||
Final Accepted Text | |||||
Summary | 0001156: Should fflush (NULL) flush streams not backed by files? | ||||
Description | The description of fflush was not updated when open_memstream was added. This means that currently, fflush (NULL) is also required to perform an fflush operation on such streams. I think fflush (NULL) is predominantly useful for file-based streams (maybe before a call to fork), and the global bookkeeping required for flushing in-memory streams is unecessary. | ||||
Desired Action | Clarify that fflush (NULL) only affects streams associated with an open file. (The term “stream associated with an open file” is already used in the description of setvbuf.) | ||||
Tags | No tags attached. |
|
OLD resolution (this bug is now closed as a dup of bug 0000626). On page 859 line 28961 section fflush, change: all streams for which the behavior is defined aboveto: all streams that are associated with an open file and for which the behavior is defined above |
|
Unless I've misread something, this change seems to conflict with the interpretation given for 0000626. |
|
I believe the distinction is 'stream' in this context relates to anything that can be referenced by a FILE * or file handle/descriptor (via fdopen()), but 'open file' refers to the file descriptions. It is not limited to those of regular files on media that are used when these are opened, as implied by the Desired Action. What data structure is used internally to represent the file description can vary per file type. Portable applications have to contend with a call to setvbuf() may not be supported by some of these implementations of memstream type file descriptions, some may not set timestamps as 626 focused on, or some may not support more than one wide char of ungetc(), so these may be 'open files' but don't have the 'behavior defined above'. Where it could be clearer, to me, is that not being able to do one unsupported operation doesn't mean the flush can be skipped entirely; the implementation should still do the defined operations that are supported. |
|
This is being closed as a duplicate of bug 0000626. |
Date Modified | Username | Field | Change |
---|---|---|---|
2017-07-20 08:13 | Florian Weimer | New Issue | |
2017-07-20 08:13 | Florian Weimer | Name | => Florian Weimer |
2017-07-20 08:13 | Florian Weimer | Organization | => Red Hat |
2017-07-20 08:13 | Florian Weimer | User Reference | => https://sourceware.org/bugzilla/show_bug.cgi?id=21735 |
2017-07-20 08:13 | Florian Weimer | Section | => fflush |
2017-07-20 08:13 | Florian Weimer | Page Number | => unknown |
2017-07-20 08:13 | Florian Weimer | Line Number | => unknown |
2019-01-10 16:18 | geoffclare | Note Added: 0004203 | |
2019-01-10 16:19 | geoffclare | Page Number | unknown => 859 |
2019-01-10 16:19 | geoffclare | Line Number | unknown => 28961 |
2019-01-10 16:19 | geoffclare | Interp Status | => --- |
2019-01-10 16:19 | geoffclare | Final Accepted Text | => 0001156:0004203 |
2019-01-10 16:19 | geoffclare | Status | New => Resolved |
2019-01-10 16:19 | geoffclare | Resolution | Open => Accepted As Marked |
2019-01-10 16:19 | geoffclare | Tag Attached: tc3-2008 | |
2019-01-11 20:11 | osoong | Note Added: 0004206 | |
2019-01-11 23:03 | eblake | Relationship added | related to 0000626 |
2019-01-12 23:47 | shware_systems | Note Added: 0004207 | |
2019-01-14 16:57 | geoffclare | Final Accepted Text | 0001156:0004203 => |
2019-01-14 16:57 | geoffclare | Note Added: 0004209 | |
2019-01-14 16:57 | geoffclare | Status | Resolved => Closed |
2019-01-14 16:57 | geoffclare | Resolution | Accepted As Marked => Duplicate |
2019-01-14 16:57 | geoffclare | Tag Detached: tc3-2008 | |
2019-01-14 16:57 | geoffclare | Relationship replaced | duplicate of 0000626 |
2019-01-14 16:58 | geoffclare | Note Edited: 0004203 |