|Anonymous | Login||2021-05-09 07:44 UTC|
|Main | My View | View Issues | Change Log | Docs|
|Viewing Issue Simple Details|
|ID||Category||Severity||Type||Date Submitted||Last Update|
|0001324||[1003.1(2016/18)/Issue7+TC2] System Interfaces||Objection||Clarification Requested||2020-02-07 15:57||2020-10-17 05:29|
|Organization||QNX Software Systems|
|Final Accepted Text|
|Summary||0001324: sem_open() should not require the same name to map to the same virtual address|
The current specification mandates that two calls to sem_open() with the same name made by the same process return the same virtual address, so long as no process called sem_unlink() in between the two calls.
I believe that this is an unreasonable requirement, for the following reasons:
1. There is no dependency by any other sem_*() function on this requirement. So long as the two sem_t pointers returned by the calls refer to the same underlying semaphore all sem_*() functions will behave correctly when passed these pointers.
2. It puts an unnecessary burden on the system to track virtual address usage by the calling process. The system should only need to track the association of any given sem_t pointer to the underlying object. If, for example, the sem_t pointer holds a file descriptor to an open semaphore, then the system only needs to track the file descriptor.
3. Since sem_close() is documented as releasing all resources for the semaphore and making the pointer invalid for future use, the requirement promotes an unsafe "open twice, close once" paradigm.
4. The requirement deviates from the standard approach to resource allocation, where multiple calls provide different handles, even if those handles refer to the same object (e.g., open(), shm_open(), mmap() with the same file descriptor and offset)
5. The requirement may conflict with the following future direction: "A future version might require the sem_open() and sem_unlink() functions to have semantics similar to normal file system operations."
|Desired Action||Make the requirement optional|
|Tags||No tags attached.|
|This was discussed during the 2020-10-12 teleconference. We agree that this is a defect, but we need suggested wording. sem_close() would need to be updated as well. We want to catch up on our backlog of reported bugs, and crafting wording will bog us down a bit, so for now we're moving on to another bug. We will return to this once someone has proposed wording, or if we catch up on all the other bugs and have time to come up with wording during the telecon.|
|2020-02-07 15:57||elahav||New Issue|
|2020-02-07 15:57||elahav||Name||=> Elad Lahav|
|2020-02-07 15:57||elahav||Organization||=> QNX Software Systems|
|2020-02-07 15:57||elahav||Section||=> sem_open()|
|2020-02-07 15:57||elahav||Page Number||=> (page or range of pages)|
|2020-02-07 15:57||elahav||Line Number||=> (Line or range of lines)|
|2020-02-07 19:14||elahav||Issue Monitored: elahav|
|2020-10-12 15:41||nick||Page Number||(page or range of pages) => 1854|
|2020-10-12 15:41||nick||Line Number||(Line or range of lines) => 60011|
|2020-10-12 15:41||nick||Interp Status||=> ---|
|2020-10-17 05:29||agadmin||Note Added: 0005054|
|Mantis 1.1.6[^] Copyright © 2000 - 2008 Mantis Group|