File: msgget.2

package info (click to toggle)
manpages-ja 0.4.0.0.20000115-2
  • links: PTS
  • area: main
  • in suites: potato
  • size: 8,760 kB
  • ctags: 3
  • sloc: sh: 6,269; perl: 155; makefile: 55
file content (238 lines) | stat: -rw-r--r-- 5,653 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
.\" Copyright 1993 Giorgio Ciucci <giorgio@crcc.it>
.\"
.\" Permission is granted to make and distribute verbatim copies of this
.\" manual provided the copyright notice and this permission notice are
.\" preserved on all copies.
.\"
.\" Permission is granted to copy and distribute modified versions of this
.\" manual under the conditions for verbatim copying, provided that the
.\" entire resulting derived work is distributed under the terms of a
.\" permission notice identical to this one
.\" 
.\" Since the Linux kernel and libraries are constantly changing, this
.\" manual page may be incorrect or out-of-date.  The author(s) assume no
.\" responsibility for errors or omissions, or for damages resulting from
.\" the use of the information contained herein.  The author(s) may not
.\" have taken the same level of care in the production of this manual,
.\" which is licensed free of charge, as they might when working
.\" professionally.
.\" 
.\" Formatted or processed versions of this manual, if unaccompanied by
.\" the source, must acknowledge the copyright and authors of this work.
.\"
.\" Added correction due to Nick Duffek <nsd@bbc.com>, aeb, 960426
.\" Modified Wed Nov  6 04:00:31 1996 by Eric S. Raymond <esr@thyrsus.com>
.\"
.\" Japanese Version Copyright (c) 1997 HANATAKA Shinya
.\"         all rights reserved.
.\" Translated Sun Feb 23 16:52:20 JST 1997
.\"         by HANATAKA Shinya <hanataka@abyss.rim.or.jp>
.\"
.\"WORD:	message			å
.\"WORD:	queue			塼
.\"WORD:	identifier		̻
.\"WORD:	argument		
.\"WORD:	owner			ͭ
.\"WORD:	group			롼
.\"WORD:	other			¾
.\"WORD:	initialize		
.\"WORD:	effective user-ID	¸桼ID
.\"WORD:	effective group-ID	¸롼ID
.\"WORD:	current time		߻
.\"WORD:	policy			
.\"
.TH MSGGET 2 "November 1, 1993" "Linux 0.99.13" "Linux Programmer's Manual" 
.SH ̾
msgget \- å塼̻Ҥ
.SH 
.nf
.B
# include <sys/types.h>
.B
# include <sys/ipc.h>
.B
# include <sys/msg.h>
.fi
.sp
.BI "int msgget ( key_t " key ,
.BI "int "msgflg " )"
.SH 
δؿ
.I key 
ͤδϢå塼̻(identifier)֤
.I key

.B IPC_PRIVATE
ꤵ줿Ͽå塼롣
ޤ
.I key

.BR IPC_PRIVATE 
ǤʤƤ
.IR key
˴Ϣå塼¸ߤ
.I msgflg

.B IPC_CREAT
ꤵ줿
(
.IB msgflg & IPC_CREAT
Ǥʤ)Ͽå塼롣
.I msgflg

.B IPC_CREAT

.B IPC_EXCL
¸ߤϴ¸ߤå塼ºŤ
.BR open (2)
ƥࡦ mode 
.B O_CREAT

.B O_EXCL
ꤷƱ̤ͤ: 㤨
.I msgflg

.B IPC_CREAT

.B IPC_EXCL
ξꤵ줪ꡢ
.IR key 
Фå塼¸ߤ
.B msgget
ϼԤ롣
.PP
ξ硢
.I msgflg
β 9 ӥåȤ
Υå塼Υĥѥ᡼롣
εĥӥåȤ
.BR open (2)

.BR creat (2)
ƥࡦΥĥѥ᡼ƱƱ̣
Ѥ롣(¹ԵĤϻѤƤʤ)
.PP
ˡκݤˡƥϥå塼ǡ¤
.B msqid_ds
ʲΤ褦˽:
.IP
.B msg_perm.cuid

.B msg_perm.uid
ˤϸƤӽФץμ¸(effective)桼 ID ꤵ롣
.IP
.B msg_perm.cgid

.B msg_perm.gid
ˤϸƤӽФץμ¸롼 ID ꤵ롣
.IP
.B msg_perm.mode
β 9 ӥåȤˤ
.IR msgflg 
β 9 ӥåȤꤵ롣
.IP
.BR msg_qnum ,
.BR msg_lspid ,
.BR msg_lrpid ,
.BR msg_stime ,
.B msg_rtime
 0 ꤵ롣
.IP
.B msg_ctime
ˤϸ߻郎ꤵ롣
.IP
.B msg_qbytes
ˤϥƥ³
.BR MSGMNB 
ꤵ롣
.PP
å塼Ǥ¸ߤϥĤ졢
˲(destruction)ޡʤå롣
.SH ֤
硢֤ͤϥå塼̻()
Ǥ롣Ǥʤ
.B \-1
֤졢
.B errno
ˤΥ顼롣
.SH 顼
Ԥˤ
.B errno
˰ʲͤΤʤΤɤ줫ꤵ:
.TP 11
.B EACCES
.IR key 
˴Ϣå塼¸ߤ뤬
ƤӽФץˤϤΥ塼ФƤΥĤʤ
.TP
.B EEXIST
.B key
˴Ϣå塼¸ߤ
.I msgflg

.B IPC_CREAT

.BR IPC_EXCL
ꤵƤ롣
.TP
.B EIDRM
Υå塼˲(remove)ޡ롣
.TP
.B ENOENT
.I key
˴Ϣå塼¸ߤ
.I msgflg

.BR IPC_CREAT
ꤵƤʤ
.TP
.B ENOMEM
å塼ʤФʤʤǡ¤ΤΤ
ʬʥ꤬¸ߤʤ
.TP
.B ENOSPC
å塼ʤФʤʤå塼κ
ƥ³
.RB ( MSGMNI )
ĶƤ롣
.SH 
.B IPC_PRIVATE
ϥե饰եɤǤϤʤ
.B key_t
Ǥ롣
üͤ
.IR key 
˻ꤵȡƥࡦ
.I msgflg
β 9 ӥåȰʳƤ̵뤷()
å塼롣
.PP
.B msgget
ƥࡦ˱ƶå塼λ񸻤Υƥ³ˤ
ʲΤΤ:
.TP 11
.B MSGMNI
ƥΤΥå塼κ: ˰¸
.SH Х
.B IPC_PRIVATE
λѤ¾ץʬ줿å塼˥뤳Ȥ
˸ʤ
.PP
եƱͤˡߤΤȤå塼ؤ¾Ūʥ
ݾڤͭˡ¸ߤʤ
.I msgflg

.B IPC_CREAT

.B IPC_EXCL
ξꤹ뤳Ȥϡ()å塼
뤳ȤΤߤݾڤΥå塼ؤ¾Ūʥ
̣ʤ
.SH 
SVr4, SVID.  SVr4  EIDRM 顼ˤĤƵҤƤʤ
.SH Ϣ
.BR ftok (3),
.BR ipc (5),
.BR msgctl (2),
.BR msgsnd (2),
.BR msgrcv (2)