(SHMLBA is defined in
.Aq Pa sys/shm.h
).
-
A shared memory segment can be mapped read-only by specifying the
SHM_RDONLY flag in
.Fa shmflg .
-
.Fn shmdt
unmaps the shared memory segment that is currently mapped at
.Fa shmaddr
.Fn shmat
will fail if:
.Bl -tag -width Er
-.It Bq Er EACCESS
+.It Bq Er EACCES
The calling process has no permission to access this shared memory segment.
.It Bq Er ENOMEM
There is not enough available data space for the calling process to
.It Bq Er EINVAL
.Fa shmid
is not a valid shared memory identifier.
-
.Fa shmaddr
specifies an illegal address.
.It Bq Er EMFILE
The number of shared memory segments has reached the system-wide limit.
.El
-
.Fn shmdt
will fail if:
.Bl -tag -width Er
.It Bq Er EINVAL
.Fa shmaddr
is not the start address of a mapped shared memory segment.
+.El
.Sh SEE ALSO
.Xr shmctl 2 ,
.Xr shmget 2 ,