summaryrefslogtreecommitdiffstats
path: root/lib/libc/sys/semctl.2
diff options
context:
space:
mode:
authormr <mr@FreeBSD.org>2001-10-11 08:15:14 +0000
committermr <mr@FreeBSD.org>2001-10-11 08:15:14 +0000
commit188e03f8f915b4927b4647c7a022c4b273d50839 (patch)
tree6e7d3fd293eb6e4e9294689fba6d0217af2b9e62 /lib/libc/sys/semctl.2
parent532fbd6c3cdd93c81c04a275eb0a7d898dcfc8a1 (diff)
downloadFreeBSD-src-188e03f8f915b4927b4647c7a022c4b273d50839.zip
FreeBSD-src-188e03f8f915b4927b4647c7a022c4b273d50839.tar.gz
Fix SysV Semaphore Handling.
Updated by peter following KSE and Giant pushdown. I've running with this patch for two week with no ill side effects. PR: kern/12014: Fix SysV Semaphore handling Submitted by: Peter Jeremy <peter.jeremy@alcatel.com.au>
Diffstat (limited to 'lib/libc/sys/semctl.2')
-rw-r--r--lib/libc/sys/semctl.218
1 files changed, 17 insertions, 1 deletions
diff --git a/lib/libc/sys/semctl.2 b/lib/libc/sys/semctl.2
index 4e3765c..6950371 100644
--- a/lib/libc/sys/semctl.2
+++ b/lib/libc/sys/semctl.2
@@ -107,6 +107,8 @@ Set the value of semaphore number
.Fa semnum
to
.Fa arg.val .
+Outstanding adjust on exit values for this semaphore in any process
+are cleared.
.It Dv GETPID
Return the pid of the last process to perform an operation on
semaphore number
@@ -127,6 +129,8 @@ array pointed to by
Set the values of all of the semaphores in the set to the values
in the array pointed to by
.Fa arg.array .
+Outstanding adjust on exit values for all semaphores in this set,
+in any process are cleared.
.El
.Pp
The
@@ -152,7 +156,10 @@ struct semid_ds {
.Sh RETURN VALUES
On success, when
.Fa cmd
-is one of GETVAL, GETNCNT, or GETZCNT,
+is one of
+.Dv GETVAL , GETNCNT
+or
+.Dv GETZCNT ,
.Fn semctl
returns the corresponding value; otherwise, 0 is returned.
On failure, -1 is returned, and
@@ -174,7 +181,16 @@ the semaphore set's owner or creator.
.It Bq Er EACCES
Permission denied due to mismatch between operation and mode of
semaphore set.
+.It Bq Er ERANGE
+.Dv SETVAL
+or
+.Dv SETALL
+attempted to set a semaphore outside the allowable range
+.Bq 0 .. Dv SEMVMX .
.El
.Sh SEE ALSO
.Xr semget 2 ,
.Xr semop 2
+.Sh BUGS
+.Dv SETALL
+may update some semaphore elements before returning an error.
OpenPOWER on IntegriCloud