HomeFreeBSD

MFC r295385: semget(): Check for [EEXIST] error first.

Description

MFC r295385: semget(): Check for [EEXIST] error first.

Although POSIX literally permits failing with [EINVAL] if IPC_CREAT and
IPC_EXCL were both passed, the semaphore set already exists and has fewer
semaphores than nsems, this does not allow an application to retry safely:
if the [EINVAL] is actually because of the semmsl limit, an infinite loop
would result.

PR: 206927

Details

Provenance
jillesAuthored on
Parents
rS297746: ioat(4): ioat_get_dmaengine(): Add M_WAITOK mode
Branches
Unknown
Tags
Unknown