Details

[Home]

Issue of the Standard # S0080

Brief

No information about return value in the description of sem_init() function.

Detailed Description

Section ‘RETURN VALUE’ of description of function sem_init() says that "upon successful completion, the sem_init() function shall initialize the semaphore in sem" but there is no information about return value in this case.

Problem location(s) in the standard

The Open Group Base Specifications Issue 6 IEEE Std 1003.1, 2004 Edition (SUS 3.0), System Interfaces, description of function sem_init().

Possible solutions

Change the RETURN VALUE from:
“Upon successful completion, the sem_init() function shall initialize the semaphore in sem. Otherwise, it shall return -1 and set errno to indicate the error.”
to:
“Upon successful completion, the sem_init() function shall initialize the semaphore in sem and return zero. Otherwise, it shall return -1 and set errno to indicate the error.”

Accepted

POSIX aardvark,
Request Number 151

[Home]