Deleted Added
full compact
shmget.2 (109831) shmget.2 (131504)
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 109831 2003-01-25 21:33:05Z alfred $
26.\" $FreeBSD: head/lib/libc/sys/shmget.2 131504 2004-07-02 23:52:20Z 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

--- 14 unchanged lines hidden (view full) ---

49returns the identifier of a newly created or previously existing shared
50memory segment.
51.\"
52.\" The following bit about keys and modes also applies to semaphores
53.\" and message queues.
54.\"
55The key
56is analogous to a filename: it provides a handle that names an
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

--- 14 unchanged lines hidden (view full) ---

49returns the identifier of a newly created or previously existing shared
50memory segment.
51.\"
52.\" The following bit about keys and modes also applies to semaphores
53.\" and message queues.
54.\"
55The key
56is analogous to a filename: it provides a handle that names an
57IPC object. There are three ways to specify a key:
57IPC object.
58There are three ways to specify a key:
58.Bl -bullet
59.It
60IPC_PRIVATE may be specified, in which case a new IPC object
61will be created.
62.It
59.Bl -bullet
60.It
61IPC_PRIVATE may be specified, in which case a new IPC object
62will be created.
63.It
63An integer constant may be specified. If no IPC object corresponding
64An integer constant may be specified.
65If 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
70The
71.Xr ftok 3

--- 23 unchanged lines hidden (view full) ---

95.\" XXX - we should also mention how uid, euid, and gid affect ownership
96.\" and use
97.\"
98.\" end section about keys and modes
99.\"
100.Pp
101When creating a new shared memory segment,
102.Fa size
66to
67.Fa key
68is specified and the IPC_CREAT bit is set in
69.Fa flag ,
70a new one will be created.
71.It
72The
73.Xr ftok 3

--- 23 unchanged lines hidden (view full) ---

97.\" XXX - we should also mention how uid, euid, and gid affect ownership
98.\" and use
99.\"
100.\" end section about keys and modes
101.\"
102.Pp
103When creating a new shared memory segment,
104.Fa size
103indicates the desired size of the new segment in bytes. The size
105indicates the desired size of the new segment in bytes.
106The size
104of the segment may be rounded up to a multiple convenient to the
105kernel (i.e., the page size).
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

--- 32 unchanged lines hidden ---
107of the segment may be rounded up to a multiple convenient to the
108kernel (i.e., the page size).
109.Sh RETURN VALUES
110Upon successful completion,
111.Fn shmget
112returns the positive integer identifier of a shared memory segment.
113Otherwise, -1 is returned and
114.Va errno

--- 32 unchanged lines hidden ---