View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0001239 | 1003.1(2016/18)/Issue7+TC2 | System Interfaces | public | 2019-03-16 09:55 | 2024-06-11 09:08 |
Reporter | kre | Assigned To | |||
Priority | normal | Severity | Objection | Type | Error |
Status | Closed | Resolution | Accepted As Marked | ||
Name | Robert Elz | ||||
Organization | |||||
User Reference | |||||
Section | shmat | ||||
Page Number | 1940-1, 384 | ||||
Line Number | 62506, 62529, 13051-2 | ||||
Interp Status | --- | ||||
Final Accepted Text | See 0001239:0004441. | ||||
Summary | 0001239: shmat() specifies non-portable return value | ||||
Description | The standard specifies: <blTockquote> Otherwise, the shared memory segment shall not be attached, shmat( ) shall retur n (void *)-1, and errno shall be set to indicate the error. As was done with other similar operations (mmap, sem_open, ...) a new symbol should be defined to replace the non-portable use of (void *)-1. | ||||
Desired Action | Two possible solutions appear reasonable. Pick one:
| ||||
Tags | issue8 |
|
In line 62506 in page 1940, change the words:shmat() shall return (void *)-1, to: shmat() shall return SHM_FAILED, In line 62529 in page 1941, change the word: None. to: The symbol SHM_FAILED is used for the failure return of shmat() for consistency with MAP_FAILED for mmap(). However, SHM_FAILED is required to have the same value as ((void *)(intptr_t)-1) to provide backwards compatibility for applications written to earlier versions of this standard, where the failure return was specified as (void *)-1. This means that implementations need to ensure that shmat() cannot return ((void *)(intptr_t)-1) on a successful call. In XBD section 13, in the page for the <sys/shm.h> header, add two new paragraphs between lines 13051 and 13052: The <sys/shm.h> header shall define the symbolic constant SHM_FAILED which shall evaluate to the same value as ((void *)(intptr_t)-1). The <sys/shm.h> header shall define the type intptr_t as described in <stdint.h>. |
Date Modified | Username | Field | Change |
---|---|---|---|
2019-03-16 09:55 | kre | New Issue | |
2019-03-16 09:55 | kre | Name | => Robert Elz |
2019-03-16 09:55 | kre | Section | => shmat |
2019-03-16 09:55 | kre | Page Number | => 1940-1, 384 |
2019-03-16 09:55 | kre | Line Number | => 62506, 62529, 13051-2 |
2019-06-20 16:34 | Don Cragun | Tag Attached: issue8 | |
2019-06-20 16:41 | Don Cragun | Note Added: 0004441 | |
2019-06-20 16:42 | Don Cragun | Note Edited: 0004441 | |
2019-06-20 16:44 | Don Cragun | Interp Status | => --- |
2019-06-20 16:44 | Don Cragun | Final Accepted Text | => See 0001239:0004441. |
2019-06-20 16:44 | Don Cragun | Status | New => Resolved |
2019-06-20 16:44 | Don Cragun | Resolution | Open => Accepted As Marked |
2019-06-24 15:38 | eblake | Relationship added | related to 0001240 |
2019-06-24 15:38 | eblake | Relationship added | related to 0001237 |
2019-06-24 15:39 | eblake | Relationship added | related to 0001238 |
2020-04-29 15:10 | geoffclare | Status | Resolved => Applied |
2024-06-11 09:08 | agadmin | Status | Applied => Closed |