View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0001490 | 1003.1(2016/18)/Issue7+TC2 | System Interfaces | public | 2021-07-13 14:41 | 2024-06-11 09:07 |
Reporter | geoffclare | Assigned To | |||
Priority | normal | Severity | Comment | Type | Omission |
Status | Closed | Resolution | Accepted | ||
Name | Geoff Clare | ||||
Organization | The Open Group | ||||
User Reference | |||||
Section | exit() | ||||
Page Number | 796 | ||||
Line Number | 27080 | ||||
Interp Status | --- | ||||
Final Accepted Text | |||||
Summary | 0001490: warn app writers about flush errors not being detectable by exit() | ||||
Description | In light of the recent discovery that many implementations of standard utilities have an ancient bug whereby they leave buffer flushing of stdout to be done by exit() when exiting with a status that indicates successful completion, and thus do not handle write errors properly, it would be a good idea to give some advice about this in the exit() APPLICATION USAGE section to try and help application writers avoid falling into the same trap. | ||||
Desired Action | Change APPLICATION USAGE from "None" to:When a stream that has unwritten buffered data is flushed by exit() there is no way for the calling process to discover whether or not exit() successfully wrote the data to the underlying file descriptor. Therefore, it is strongly recommended that applications always ensure there is no unwritten buffered data in any stream when calling exit(), or returning from the initial call to main(), with a status value that indicates no errors occurred. Change EXAMPLES from "None" to: See APPLICATION USAGE. (This is before the APPLICATION USAGE section, so putting the example code here would mean it is before the explanation.) | ||||
Tags | tc3-2008 |
related to | 0001629 | Closed | Shell vs. read(2) errors on the script |
Date Modified | Username | Field | Change |
---|---|---|---|
2021-07-13 14:41 | geoffclare | New Issue | |
2021-07-13 14:41 | geoffclare | Name | => Geoff Clare |
2021-07-13 14:41 | geoffclare | Organization | => The Open Group |
2021-07-13 14:41 | geoffclare | Section | => exit() |
2021-07-13 14:41 | geoffclare | Page Number | => 796 |
2021-07-13 14:41 | geoffclare | Line Number | => 27080 |
2021-07-13 14:41 | geoffclare | Interp Status | => --- |
2021-11-18 17:19 | Don Cragun | Status | New => Resolved |
2021-11-18 17:19 | Don Cragun | Resolution | Open => Accepted |
2021-11-18 17:20 | Don Cragun | Tag Attached: tc3-2008 | |
2021-12-13 15:18 | geoffclare | Status | Resolved => Applied |
2023-03-20 15:48 | eblake | Relationship added | related to 0001629 |
2024-06-11 09:07 | agadmin | Status | Applied => Closed |