Page MenuHomeFreeBSD

D42032.id128076.diff
No OneTemporary

D42032.id128076.diff

diff --git a/lib/libc/sys/semctl.2 b/lib/libc/sys/semctl.2
--- a/lib/libc/sys/semctl.2
+++ b/lib/libc/sys/semctl.2
@@ -23,7 +23,7 @@
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd July 9, 2020
+.Dd October 2, 2023
.Dt SEMCTL 2
.Os
.Sh NAME
@@ -79,6 +79,15 @@
.Fa "struct semid_ds" ,
storing it in the memory pointed to by
.Fa arg.buf .
+.It Dv SEM_STAT
+Return a
+.Fa "semid_ds"
+structure as for
+.Dv IPC_STAT .
+However, for this command we assume
+.Fa semid
+is an array index in the kernel's internal array that maintains information
+about all semaphore sets on the system rather than an id of a semaphore set.
.It Dv IPC_SET
Changes the
.Fa sem_perm.uid ,
@@ -156,12 +165,19 @@
.Sh RETURN VALUES
On success, when
.Fa cmd
-is one of
+is is one of
.Dv GETVAL , GETPID , GETNCNT
or
.Dv GETZCNT ,
.Fn semctl
-returns the corresponding value; otherwise, 0 is returned.
+returns the corresponding value, when
+.Fa cmd
+is
+.Dv SEM_STAT
+.Fn semctl
+returns the identifier of the semaphore set whose index was given in
+.Fa semid ;
+otherwise, 0 is returned.
On failure, -1 is returned, and
.Va errno
is set to indicate the error.

File Metadata

Mime Type
text/plain
Expires
Thu, Jan 15, 12:21 PM (50 m, 53 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
27649946
Default Alt Text
D42032.id128076.diff (1 KB)

Event Timeline