[Bug 206927] Bad semaphore return code on collision

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Sun Feb 7 21:22:29 UTC 2016


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=206927

Jilles Tjoelker <jilles at FreeBSD.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|freebsd-bugs at FreeBSD.org    |jilles at FreeBSD.org
             Status|New                         |In Progress
                 CC|                            |jilles at FreeBSD.org

--- Comment #1 from Jilles Tjoelker <jilles at FreeBSD.org> ---
The additional [EINVAL] condition is missing from the semget(2) man page; I
will add it.

Although POSIX leaves the detection order of errors undefined (XSH 2.3 Error
Numbers), detecting [EINVAL] before [EEXIST] is clearly inconvenient for
applications. The inconvenient order has been in place for years, but it is
easy to change.

You could request the Austin Group to make this unambiguous (e.g., restrict
part of the [EINVAL] error to not occur if
((semflg&IPC_CREAT)&&(segflg&IPC_EXCL)) is non-zero).

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-bugs mailing list