shmget.2 (84306) | shmget.2 (108028) |
---|---|
1.\" 2.\" Copyright (c) 1995 David Hovemeyer <daveho@infocom.com> 3.\" 4.\" All rights reserved. 5.\" 6.\" Redistribution and use in source and binary forms, with or without 7.\" modification, are permitted provided that the following conditions 8.\" are met: --- 9 unchanged lines hidden (view full) --- 18.\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT, 19.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 20.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 21.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 22.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 24.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25.\" | 1.\" 2.\" Copyright (c) 1995 David Hovemeyer <daveho@infocom.com> 3.\" 4.\" All rights reserved. 5.\" 6.\" Redistribution and use in source and binary forms, with or without 7.\" modification, are permitted provided that the following conditions 8.\" are met: --- 9 unchanged lines hidden (view full) --- 18.\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT, 19.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 20.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 21.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 22.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 24.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25.\" |
26.\" $FreeBSD: head/lib/libc/sys/shmget.2 84306 2001-10-01 16:09:29Z ru $ | 26.\" $FreeBSD: head/lib/libc/sys/shmget.2 108028 2002-12-18 09:22:32Z ru $ |
27.\" 28.Dd July 3, 1995 29.Dt SHMGET 2 30.Os 31.Sh NAME 32.Nm shmget 33.Nd obtain a shared memory identifier 34.Sh LIBRARY --- 27 unchanged lines hidden (view full) --- 62.It 63An integer constant may be specified. If no IPC object corresponding 64to 65.Fa key 66is specified and the IPC_CREAT bit is set in 67.Fa flag , 68a new one will be created. 69.It | 27.\" 28.Dd July 3, 1995 29.Dt SHMGET 2 30.Os 31.Sh NAME 32.Nm shmget 33.Nd obtain a shared memory identifier 34.Sh LIBRARY --- 27 unchanged lines hidden (view full) --- 62.It 63An integer constant may be specified. If no IPC object corresponding 64to 65.Fa key 66is specified and the IPC_CREAT bit is set in 67.Fa flag , 68a new one will be created. 69.It |
70.Fn ftok 71may be used to generate a key from a pathname. See 72.Xr ftok 3 . | 70The 71.Xr ftok 3 72may be used to generate a key from a pathname. |
73.El 74.Pp 75The mode of a newly created IPC object is determined by 76.Em OR Ns 'ing 77the following constants into the 78.Fa flag 79parameter: 80.Bl -tag -width XSHM_WXX6XXX --- 25 unchanged lines hidden (view full) --- 106.Sh RETURN VALUES 107Upon successful completion, 108.Fn shmget 109returns the positive integer identifier of a shared memory segment. 110Otherwise, -1 is returned and 111.Va errno 112set to indicate the error. 113.Sh ERRORS | 73.El 74.Pp 75The mode of a newly created IPC object is determined by 76.Em OR Ns 'ing 77the following constants into the 78.Fa flag 79parameter: 80.Bl -tag -width XSHM_WXX6XXX --- 25 unchanged lines hidden (view full) --- 106.Sh RETURN VALUES 107Upon successful completion, 108.Fn shmget 109returns the positive integer identifier of a shared memory segment. 110Otherwise, -1 is returned and 111.Va errno 112set to indicate the error. 113.Sh ERRORS |
114.Fn Shmget | 114The 115.Fn shmget 116system call |
115will fail if: 116.Bl -tag -width Er 117.\" 118.\" XXX What about ipcperm failing? 119.\" 120.It Bq Er EINVAL 121Size specified is greater than the size of the previously existing segment. 122Size specified is less than the system imposed minimum, or greater than --- 19 unchanged lines hidden --- | 117will fail if: 118.Bl -tag -width Er 119.\" 120.\" XXX What about ipcperm failing? 121.\" 122.It Bq Er EINVAL 123Size specified is greater than the size of the previously existing segment. 124Size specified is less than the system imposed minimum, or greater than --- 19 unchanged lines hidden --- |