.\" Rewrote semun text
.\" Added semid_ds and ipc_perm structure definitions
.\" 2005-08-02, mtk: Added IPC_INFO, SEM_INFO, SEM_STAT descriptions.
+.\" 2018-03-20, dbueso: Added SEM_STAT_ANY description.
.\"
-.TH SEMCTL 2 2017-09-15 "Linux" "Linux Programmer's Manual"
+.TH SEMCTL 2 2019-03-06 "Linux" "Linux Programmer's Manual"
.SH NAME
semctl \- System V semaphore control operations
.SH SYNOPSIS
the kernel's internal array that maintains information about
all semaphore sets on the system.
.TP
+.BR SEM_STAT_ANY " (Linux-specific, since Linux 4.17)"
+Return a
+.I seminfo
+structure containing the same information as for
+.BR SEM_STAT .
+However,
+.I sem_perm.mode
+is not checked for read access for
+.IR semid
+meaning that any user can employ this operation (just as any user may read
+.IR /proc/sysvipc/sem
+to obtain the same information).
+.TP
.B GETALL
Return
.B semval
semaphore sets.
(This information can be used with repeated
.B SEM_STAT
+or
+.B SEM_STAT_ANY
operations to obtain information about all semaphore sets on the system.)
.TP
.B SEM_INFO
.B SEM_STAT
the identifier of the semaphore set whose index was given in
.IR semid .
+.TP
+.B SEM_STAT_ANY
+as for
+.BR SEM_STAT .
.PP
All other
.I cmd
.BR GETZCNT ,
.BR IPC_STAT ,
.BR SEM_STAT ,
+.BR SEM_STAT_ANY ,
.BR SETALL ,
or
.B SETVAL