OSDN Git Service

エントリ -> エントリー
[linuxjm/LDP_man-pages.git] / po4a / mqueue / po / ja.po
1 # SOME DESCRIPTIVE TITLE
2 # Copyright (C) YEAR Free Software Foundation, Inc.
3 # This file is distributed under the same license as the PACKAGE package.
4 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5 #
6 msgid ""
7 msgstr ""
8 "Project-Id-Version: PACKAGE VERSION\n"
9 "POT-Creation-Date: 2015-01-23 22:24+0900\n"
10 "PO-Revision-Date: 2015-01-25 07:20+0900\n"
11 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
12 "Language-Team: LANGUAGE <LL@li.org>\n"
13 "Language: \n"
14 "MIME-Version: 1.0\n"
15 "Content-Type: text/plain; charset=UTF-8\n"
16 "Content-Transfer-Encoding: 8bit\n"
17
18 #. type: TH
19 #: build/C/man3/mq_close.3:26
20 #, no-wrap
21 msgid "MQ_CLOSE"
22 msgstr "MQ_CLOSE"
23
24 #. type: TH
25 #: build/C/man3/mq_close.3:26 build/C/man3/mq_unlink.3:26
26 #, no-wrap
27 msgid "2014-06-13"
28 msgstr "2014-06-13"
29
30 #. type: TH
31 #: build/C/man3/mq_close.3:26 build/C/man3/mq_getattr.3:26
32 #: build/C/man2/mq_getsetattr.2:26 build/C/man3/mq_notify.3:26
33 #: build/C/man3/mq_open.3:26 build/C/man7/mq_overview.7:26
34 #: build/C/man3/mq_receive.3:26 build/C/man3/mq_send.3:26
35 #: build/C/man3/mq_unlink.3:26 build/C/man2/msgctl.2:37
36 #: build/C/man2/msgget.2:35 build/C/man2/msgop.2:41
37 #, no-wrap
38 msgid "Linux"
39 msgstr "Linux"
40
41 #. type: TH
42 #: build/C/man3/mq_close.3:26 build/C/man3/mq_getattr.3:26
43 #: build/C/man2/mq_getsetattr.2:26 build/C/man3/mq_notify.3:26
44 #: build/C/man3/mq_open.3:26 build/C/man7/mq_overview.7:26
45 #: build/C/man3/mq_receive.3:26 build/C/man3/mq_send.3:26
46 #: build/C/man3/mq_unlink.3:26 build/C/man2/msgctl.2:37
47 #: build/C/man2/msgget.2:35 build/C/man2/msgop.2:41
48 #, no-wrap
49 msgid "Linux Programmer's Manual"
50 msgstr "Linux Programmer's Manual"
51
52 #. type: SH
53 #: build/C/man3/mq_close.3:27 build/C/man3/mq_getattr.3:27
54 #: build/C/man2/mq_getsetattr.2:27 build/C/man3/mq_notify.3:27
55 #: build/C/man3/mq_open.3:27 build/C/man7/mq_overview.7:27
56 #: build/C/man3/mq_receive.3:27 build/C/man3/mq_send.3:27
57 #: build/C/man3/mq_unlink.3:27 build/C/man2/msgctl.2:38
58 #: build/C/man2/msgget.2:36 build/C/man2/msgop.2:42
59 #, no-wrap
60 msgid "NAME"
61 msgstr "名前"
62
63 #. type: Plain text
64 #: build/C/man3/mq_close.3:29
65 msgid "mq_close - close a message queue descriptor"
66 msgstr "mq_close - メッセージキュー記述子をクローズする"
67
68 #. type: SH
69 #: build/C/man3/mq_close.3:29 build/C/man3/mq_getattr.3:29
70 #: build/C/man2/mq_getsetattr.2:29 build/C/man3/mq_notify.3:29
71 #: build/C/man3/mq_open.3:29 build/C/man3/mq_receive.3:29
72 #: build/C/man3/mq_send.3:29 build/C/man3/mq_unlink.3:29
73 #: build/C/man2/msgctl.2:40 build/C/man2/msgget.2:38 build/C/man2/msgop.2:44
74 #, no-wrap
75 msgid "SYNOPSIS"
76 msgstr "書式"
77
78 #. type: Plain text
79 #: build/C/man3/mq_close.3:32 build/C/man3/mq_getattr.3:32
80 #: build/C/man3/mq_notify.3:32 build/C/man3/mq_receive.3:32
81 #: build/C/man3/mq_send.3:32 build/C/man3/mq_unlink.3:32
82 #, no-wrap
83 msgid "B<#include E<lt>mqueue.hE<gt>>\n"
84 msgstr "B<#include E<lt>mqueue.hE<gt>>\n"
85
86 #. type: Plain text
87 #: build/C/man3/mq_close.3:34
88 #, no-wrap
89 msgid "B<int mq_close(mqd_t >I<mqdes>B<);>\n"
90 msgstr "B<int mq_close(mqd_t >I<mqdes>B<);>\n"
91
92 #. type: Plain text
93 #: build/C/man3/mq_close.3:37 build/C/man3/mq_getattr.3:40
94 #: build/C/man3/mq_notify.3:37 build/C/man3/mq_open.3:41
95 #: build/C/man3/mq_receive.3:45 build/C/man3/mq_send.3:45
96 #: build/C/man3/mq_unlink.3:37
97 msgid "Link with I<-lrt>."
98 msgstr "I<-lrt> でリンクする。"
99
100 #. type: SH
101 #: build/C/man3/mq_close.3:37 build/C/man3/mq_getattr.3:40
102 #: build/C/man2/mq_getsetattr.2:40 build/C/man3/mq_notify.3:37
103 #: build/C/man3/mq_open.3:41 build/C/man7/mq_overview.7:29
104 #: build/C/man3/mq_receive.3:57 build/C/man3/mq_send.3:57
105 #: build/C/man3/mq_unlink.3:37 build/C/man2/msgctl.2:48
106 #: build/C/man2/msgget.2:46 build/C/man2/msgop.2:57
107 #, no-wrap
108 msgid "DESCRIPTION"
109 msgstr "説明"
110
111 #. type: Plain text
112 #: build/C/man3/mq_close.3:41
113 msgid "B<mq_close>()  closes the message queue descriptor I<mqdes>."
114 msgstr "B<mq_close>()  はメッセージキュー記述子 (message queue descriptor)  I<mqdes> をクローズする。"
115
116 #. type: Plain text
117 #: build/C/man3/mq_close.3:47
118 msgid "If the calling process has attached a notification request to this message queue via I<mqdes>, then this request is removed, and another process can now attach a notification request."
119 msgstr "呼び出し元のプロセスが I<mqdes> 経由でこのメッセージキューに通知要求 (notification request)  を設定している場合、通知要求は削除され、他のプロセスがそのキューに 対して通知要求を設定できるようになる。"
120
121 #. type: SH
122 #: build/C/man3/mq_close.3:47 build/C/man3/mq_getattr.3:118
123 #: build/C/man3/mq_notify.3:134 build/C/man3/mq_open.3:136
124 #: build/C/man3/mq_receive.3:113 build/C/man3/mq_send.3:119
125 #: build/C/man3/mq_unlink.3:44 build/C/man2/msgctl.2:229
126 #: build/C/man2/msgget.2:137 build/C/man2/msgop.2:339
127 #, no-wrap
128 msgid "RETURN VALUE"
129 msgstr "返り値"
130
131 #. type: Plain text
132 #: build/C/man3/mq_close.3:53
133 msgid "On success B<mq_close>()  returns 0; on error, -1 is returned, with I<errno> set to indicate the error."
134 msgstr "成功すると、 B<mq_close>()  は 0 を返す。エラーの場合、-1 を返し、 I<errno> にエラーを示す値を設定する。"
135
136 #. type: SH
137 #: build/C/man3/mq_close.3:53 build/C/man3/mq_getattr.3:126
138 #: build/C/man3/mq_notify.3:140 build/C/man3/mq_open.3:148
139 #: build/C/man3/mq_receive.3:122 build/C/man3/mq_send.3:127
140 #: build/C/man3/mq_unlink.3:50 build/C/man2/msgctl.2:254
141 #: build/C/man2/msgget.2:143 build/C/man2/msgop.2:352
142 #, no-wrap
143 msgid "ERRORS"
144 msgstr "エラー"
145
146 #. type: TP
147 #: build/C/man3/mq_close.3:54 build/C/man3/mq_getattr.3:127
148 #: build/C/man3/mq_notify.3:141 build/C/man3/mq_receive.3:129
149 #: build/C/man3/mq_send.3:134
150 #, no-wrap
151 msgid "B<EBADF>"
152 msgstr "B<EBADF>"
153
154 #. type: Plain text
155 #: build/C/man3/mq_close.3:59 build/C/man3/mq_getattr.3:132
156 #: build/C/man3/mq_notify.3:146
157 msgid "The descriptor specified in I<mqdes> is invalid."
158 msgstr "I<mqdes> に指定されたディスクリプターが不正である。"
159
160 #. type: SH
161 #: build/C/man3/mq_close.3:59 build/C/man3/mq_getattr.3:137
162 #: build/C/man3/mq_open.3:237 build/C/man3/mq_receive.3:156
163 #: build/C/man3/mq_send.3:161 build/C/man3/mq_unlink.3:62
164 #, no-wrap
165 msgid "ATTRIBUTES"
166 msgstr "属性"
167
168 #. type: SS
169 #: build/C/man3/mq_close.3:60 build/C/man3/mq_getattr.3:138
170 #: build/C/man3/mq_open.3:238 build/C/man3/mq_receive.3:157
171 #: build/C/man3/mq_send.3:162 build/C/man3/mq_unlink.3:63
172 #, no-wrap
173 msgid "Multithreading (see pthreads(7))"
174 msgstr "マルチスレッディング (pthreads(7) 参照)"
175
176 #. type: Plain text
177 #: build/C/man3/mq_close.3:64
178 msgid "The B<mq_close>()  function is thread-safe."
179 msgstr "関数 B<mq_close>() はスレッドセーフである。"
180
181 #. type: SH
182 #: build/C/man3/mq_close.3:64 build/C/man3/mq_getattr.3:144
183 #: build/C/man2/mq_getsetattr.2:50 build/C/man3/mq_notify.3:174
184 #: build/C/man3/mq_open.3:242 build/C/man7/mq_overview.7:351
185 #: build/C/man3/mq_receive.3:163 build/C/man3/mq_send.3:168
186 #: build/C/man3/mq_unlink.3:67 build/C/man2/msgctl.2:325
187 #: build/C/man2/msgget.2:182 build/C/man2/msgop.2:482
188 #, no-wrap
189 msgid "CONFORMING TO"
190 msgstr "準拠"
191
192 #. type: Plain text
193 #: build/C/man3/mq_close.3:66 build/C/man3/mq_getattr.3:146
194 #: build/C/man3/mq_notify.3:176 build/C/man3/mq_open.3:244
195 #: build/C/man7/mq_overview.7:353 build/C/man3/mq_receive.3:165
196 #: build/C/man3/mq_send.3:170 build/C/man3/mq_unlink.3:69
197 msgid "POSIX.1-2001."
198 msgstr "POSIX.1-2001."
199
200 #. type: SH
201 #: build/C/man3/mq_close.3:66 build/C/man3/mq_getattr.3:146
202 #: build/C/man2/mq_getsetattr.2:52 build/C/man7/mq_overview.7:353
203 #: build/C/man3/mq_receive.3:165 build/C/man3/mq_send.3:170
204 #: build/C/man2/msgctl.2:328 build/C/man2/msgget.2:184
205 #: build/C/man2/msgop.2:494
206 #, no-wrap
207 msgid "NOTES"
208 msgstr "注意"
209
210 #. type: Plain text
211 #: build/C/man3/mq_close.3:70
212 msgid "All open message queues are automatically closed on process termination, or upon B<execve>(2)."
213 msgstr "プロセス終了時、もしくは B<execve>(2)  実行時に、全てのオープンされたメッセージキューは自動的にクローズされる。"
214
215 #. type: SH
216 #: build/C/man3/mq_close.3:70 build/C/man3/mq_getattr.3:230
217 #: build/C/man2/mq_getsetattr.2:56 build/C/man3/mq_notify.3:243
218 #: build/C/man3/mq_open.3:248 build/C/man7/mq_overview.7:378
219 #: build/C/man3/mq_receive.3:171 build/C/man3/mq_send.3:176
220 #: build/C/man3/mq_unlink.3:69 build/C/man2/msgctl.2:367
221 #: build/C/man2/msgget.2:229 build/C/man2/msgop.2:579
222 #, no-wrap
223 msgid "SEE ALSO"
224 msgstr "関連項目"
225
226 #. type: Plain text
227 #: build/C/man3/mq_close.3:78
228 msgid "B<mq_getattr>(3), B<mq_notify>(3), B<mq_open>(3), B<mq_receive>(3), B<mq_send>(3), B<mq_unlink>(3), B<mq_overview>(7)"
229 msgstr "B<mq_getattr>(3), B<mq_notify>(3), B<mq_open>(3), B<mq_receive>(3), B<mq_send>(3), B<mq_unlink>(3), B<mq_overview>(7)"
230
231 #. type: SH
232 #: build/C/man3/mq_close.3:78 build/C/man3/mq_getattr.3:238
233 #: build/C/man2/mq_getsetattr.2:59 build/C/man3/mq_notify.3:252
234 #: build/C/man3/mq_open.3:256 build/C/man7/mq_overview.7:392
235 #: build/C/man3/mq_receive.3:180 build/C/man3/mq_send.3:185
236 #: build/C/man3/mq_unlink.3:77 build/C/man2/msgctl.2:374
237 #: build/C/man2/msgget.2:237 build/C/man2/msgop.2:585
238 #, no-wrap
239 msgid "COLOPHON"
240 msgstr "この文書について"
241
242 #. type: Plain text
243 #: build/C/man3/mq_close.3:86 build/C/man3/mq_getattr.3:246
244 #: build/C/man2/mq_getsetattr.2:67 build/C/man3/mq_notify.3:260
245 #: build/C/man3/mq_open.3:264 build/C/man7/mq_overview.7:400
246 #: build/C/man3/mq_receive.3:188 build/C/man3/mq_send.3:193
247 #: build/C/man3/mq_unlink.3:85 build/C/man2/msgctl.2:382
248 #: build/C/man2/msgget.2:245 build/C/man2/msgop.2:593
249 msgid "This page is part of release 3.78 of the Linux I<man-pages> project.  A description of the project, information about reporting bugs, and the latest version of this page, can be found at \\%http://www.kernel.org/doc/man-pages/."
250 msgstr ""
251 "この man ページは Linux I<man-pages> プロジェクトのリリース 3.78 の一部\n"
252 "である。プロジェクトの説明とバグ報告に関する情報は\n"
253 "http://www.kernel.org/doc/man-pages/ に書かれている。"
254
255 #. type: TH
256 #: build/C/man3/mq_getattr.3:26
257 #, no-wrap
258 msgid "MQ_GETATTR"
259 msgstr "MQ_GETATTR"
260
261 #. type: TH
262 #: build/C/man3/mq_getattr.3:26
263 #, no-wrap
264 msgid "2014-10-02"
265 msgstr "2014-10-02"
266
267 #. type: Plain text
268 #: build/C/man3/mq_getattr.3:29
269 msgid "mq_getattr, mq_setattr - get/set message queue attributes"
270 msgstr "mq_getattr, mq_setattr - メッセージキューの属性を設定/取得する"
271
272 #. type: Plain text
273 #: build/C/man3/mq_getattr.3:34
274 #, no-wrap
275 msgid "B<int mq_getattr(mqd_t >I<mqdes>B<, struct mq_attr *>I<attr>B<);>\n"
276 msgstr "B<int mq_getattr(mqd_t >I<mqdes>B<, struct mq_attr *>I<attr>B<);>\n"
277
278 #. type: Plain text
279 #: build/C/man3/mq_getattr.3:37
280 #, no-wrap
281 msgid ""
282 "B<int mq_setattr(mqd_t >I<mqdes>B<, const struct mq_attr *>I<newattr>B<,>\n"
283 "B<                 struct mq_attr *>I<oldattr>B<);>\n"
284 msgstr ""
285 "B<int mq_setattr(mqd_t >I<mqdes>B<, const struct mq_attr *>I<newattr>B<,>\n"
286 "B<                 struct mq_attr *>I<oldattr>B<);>\n"
287
288 #. type: Plain text
289 #: build/C/man3/mq_getattr.3:47
290 msgid "B<mq_getattr>()  and B<mq_setattr>()  respectively retrieve and modify attributes of the message queue referred to by the descriptor I<mqdes>."
291 msgstr "B<mq_getattr>()  と B<mq_setattr>()  は、記述子 I<mqdes> で参照されるメッセージキューの属性の取得と変更をそれぞれ行う。"
292
293 #. type: Plain text
294 #: build/C/man3/mq_getattr.3:54
295 msgid "B<mq_getattr>()  returns an I<mq_attr> structure in the buffer pointed by I<attr>.  This structure is defined as:"
296 msgstr "B<mq_getattr>()  は、 I<attr> が指すバッファーに I<mq_attr> 構造体を格納して返す。この構造体は以下のように定義されている:"
297
298 #. type: Plain text
299 #: build/C/man3/mq_getattr.3:63
300 #, no-wrap
301 msgid ""
302 "struct mq_attr {\n"
303 "    long mq_flags;       /* Flags: 0 or O_NONBLOCK */\n"
304 "    long mq_maxmsg;      /* Max. # of messages on queue */\n"
305 "    long mq_msgsize;     /* Max. message size (bytes) */\n"
306 "    long mq_curmsgs;     /* # of messages currently in queue */\n"
307 "};\n"
308 msgstr ""
309 "struct mq_attr {\n"
310 "    long mq_flags;       /* フラグ: 0 か O_NONBLOCK */\n"
311 "    long mq_maxmsg;      /* キューの最大メッセージ数 */\n"
312 "    long mq_msgsize;     /* 最大メッセージサイズ (バイト単位) */\n"
313 "    long mq_curmsgs;     /* キューに現在入っているメッセージ数 */\n"
314 "};\n"
315
316 #. type: Plain text
317 #: build/C/man3/mq_getattr.3:73
318 msgid "The I<mq_flags> field contains flags associated with the open message queue description.  This field is initialized when the queue is created by B<mq_open>(3).  The only flag that can appear in this field is B<O_NONBLOCK>."
319 msgstr "I<mq_flags> フィールドには、オープンメッセージキュー記述 (open message queue description) に関連付けられているフラグが格納される。 このフィールドは B<mq_open>(3)  でキューが作成される際に初期化される。 このフィールドに現れるフラグは B<O_NONBLOCK> だけである。"
320
321 #. type: Plain text
322 #: build/C/man3/mq_getattr.3:94
323 msgid "The I<mq_maxmsg> and I<mq_msgsize> fields are set when the message queue is created by B<mq_open>(3).  The I<mq_maxmsg> field is an upper limit on the number of messages that may be placed on the queue using B<mq_send>(3).  The I<mq_msgsize> field is an upper limit on the size of messages that may be placed on the queue.  Both of these fields must have a value greater than zero.  Two I</proc> files that place ceilings on the values for these fields are described in B<mq_overview>(7)."
324 msgstr "I<mq_maxmsg> と I<mq_msgsize> フィールドは B<mq_open>(3)  でメッセージキューが作成される際にセットされる。 I<mq_maxmsg> フィールドは、 B<mq_send>(3)  を使ってキューに入れることができるメッセージ数の上限である。 I<mq_msgsize> フィールドは、キューに入れることができるメッセージの 上限サイズである。 これらのフィールドはどちらも 0 より大きな値でなければならない。 これらのフィールドに設定できる値の上限は I</proc> ファイルにより決まる。 I</proc> ファイルの詳細は B<mq_overview>(7)  に説明されている。"
325
326 #. type: Plain text
327 #: build/C/man3/mq_getattr.3:98
328 msgid "The I<mq_curmsgs> field returns the number of messages currently held in the queue."
329 msgstr "I<mq_curmsgs> フィールドはキューに現在格納されているメッセージ数を返す。"
330
331 #. type: Plain text
332 #: build/C/man3/mq_getattr.3:118
333 msgid "B<mq_setattr>()  sets message queue attributes using information supplied in the I<mq_attr> structure pointed to by I<newattr>.  The only attribute that can be modified is the setting of the B<O_NONBLOCK> flag in I<mq_flags>.  The other fields in I<newattr> are ignored.  If the I<oldattr> field is not NULL, then the buffer that it points to is used to return an I<mq_attr> structure that contains the same information that is returned by B<mq_getattr>()."
334 msgstr "B<mq_setattr>()  は、 I<newattr> が指す I<mq_attr> 構造体で与えられた情報を使って、メッセージキューの属性を設定する。 変更することができる属性は、 I<mq_flags> の B<O_NONBLOCK> フラグの設定だけである。 I<newattr> の他のフィールドは無視される。 I<oldattr> フィールドが NULL 以外の場合、 B<mq_getattr>()  が返すのと同じ情報を格納した I<mq_attr> 構造体を I<oldattr> が指すバッファーに入れて返す。"
335
336 #. type: Plain text
337 #: build/C/man3/mq_getattr.3:126
338 msgid "On success B<mq_getattr>()  and B<mq_setattr>()  return 0; on error, -1 is returned, with I<errno> set to indicate the error."
339 msgstr "成功すると、 I<mq_getattr ()> と I<mq_setattr ()> は 0 を返す。エラーの場合、-1 を返し、 I<errno> にエラーを示す値を設定する。"
340
341 #. type: TP
342 #: build/C/man3/mq_getattr.3:132 build/C/man3/mq_notify.3:150
343 #: build/C/man3/mq_open.3:169 build/C/man3/mq_receive.3:138
344 #: build/C/man3/mq_send.3:143 build/C/man2/msgctl.2:285
345 #: build/C/man2/msgop.2:383 build/C/man2/msgop.2:439
346 #, no-wrap
347 msgid "B<EINVAL>"
348 msgstr "B<EINVAL>"
349
350 #. type: Plain text
351 #: build/C/man3/mq_getattr.3:137
352 msgid "I<newattr-E<gt>mq_flags> contained set bits other than B<O_NONBLOCK>."
353 msgstr "I<newattr-E<gt>mq_flags> に B<O_NONBLOCK> 以外のビットがセットされていた。"
354
355 #. type: Plain text
356 #: build/C/man3/mq_getattr.3:144
357 msgid "The B<mq_getattr>()  and B<mq_setattr>()  functions are thread-safe."
358 msgstr "関数 B<mq_getattr>() と B<mq_setattr>() はスレッドセーフである。"
359
360 #. type: Plain text
361 #: build/C/man3/mq_getattr.3:154
362 msgid "On Linux, B<mq_getattr>()  and B<mq_setattr>()  are library functions layered on top of the B<mq_getsetattr>(2)  system call."
363 msgstr "Linux では、 B<mq_getattr>()  と B<mq_setattr>()  はライブラリ関数であり、 B<mq_getsetattr>(2)  システムコールを用いて実装されている。"
364
365 #. type: SH
366 #: build/C/man3/mq_getattr.3:154 build/C/man3/mq_notify.3:176
367 #: build/C/man7/mq_overview.7:366
368 #, no-wrap
369 msgid "EXAMPLE"
370 msgstr "例"
371
372 #. type: Plain text
373 #: build/C/man3/mq_getattr.3:165
374 msgid "The program below can be used to show the default I<mq_maxmsg> and I<mq_msgsize> values that are assigned to a message queue that is created with a call to B<mq_open>(3)  in which the I<attr> argument is NULL.  Here is an example run of the program:"
375 msgstr "下記のプログラムを使うと、 I<attr> 引き数に NULL を指定して B<mq_open>(3) を呼び出した際に作成されるメッセージキューに割り当てられるデフォルトの I<mq_maxmsg> と I<mq_msgsize> の値を表示できる。 このプログラムの実行例を以下に示す。"
376
377 #. type: Plain text
378 #: build/C/man3/mq_getattr.3:171
379 #, no-wrap
380 msgid ""
381 "$ B<./a.out /testq>\n"
382 "Maximum # of messages on queue:   10\n"
383 "Maximum message size:             8192\n"
384 msgstr ""
385 "$ B<./a.out /testq>\n"
386 "Maximum # of messages on queue:   10\n"
387 "Maximum message size:             8192\n"
388
389 #. type: Plain text
390 #: build/C/man3/mq_getattr.3:179
391 msgid "Since Linux 3.5, the following I</proc> files (described in B<mq_overview>(7))  can be used to control the defaults:"
392 msgstr "Linux 3.5 以降では、 (B<mq_overview>(7) に説明がある) 以下の I</proc> ファイルを使ってデフォルト値を制御できる。"
393
394 #. type: Plain text
395 #: build/C/man3/mq_getattr.3:188
396 #, no-wrap
397 msgid ""
398 "$ B<uname -sr>\n"
399 "Linux 3.8.0\n"
400 "$ B<cat /proc/sys/fs/mqueue/msg_default>\n"
401 "10\n"
402 "$ B<cat /proc/sys/fs/mqueue/msgsize_default>\n"
403 "8192\n"
404 msgstr ""
405 "$ B<uname -sr>\n"
406 "Linux 3.8.0\n"
407 "$ B<cat /proc/sys/fs/mqueue/msg_default>\n"
408 "10\n"
409 "$ B<cat /proc/sys/fs/mqueue/msgsize_default>\n"
410 "8192\n"
411
412 #. type: SS
413 #: build/C/man3/mq_getattr.3:190 build/C/man3/mq_notify.3:182
414 #, no-wrap
415 msgid "Program source"
416 msgstr "プログラムのソース"
417
418 #. type: Plain text
419 #: build/C/man3/mq_getattr.3:199
420 #, no-wrap
421 msgid ""
422 "#include E<lt>mqueue.hE<gt>\n"
423 "#include E<lt>sys/stat.hE<gt>\n"
424 "#include E<lt>fcntl.hE<gt>\n"
425 "#include E<lt>stdio.hE<gt>\n"
426 "#include E<lt>stdlib.hE<gt>\n"
427 "#include E<lt>unistd.hE<gt>\n"
428 msgstr ""
429 "#include E<lt>mqueue.hE<gt>\n"
430 "#include E<lt>sys/stat.hE<gt>\n"
431 "#include E<lt>fcntl.hE<gt>\n"
432 "#include E<lt>stdio.hE<gt>\n"
433 "#include E<lt>stdlib.hE<gt>\n"
434 "#include E<lt>unistd.hE<gt>\n"
435
436 #. type: Plain text
437 #: build/C/man3/mq_getattr.3:202
438 #, no-wrap
439 msgid ""
440 "#define errExit(msg)    do { perror(msg); exit(EXIT_FAILURE); \\e\n"
441 "                        } while (0)\n"
442 msgstr ""
443 "#define errExit(msg)    do { perror(msg); exit(EXIT_FAILURE); \\e\n"
444 "                        } while (0)\n"
445
446 #. type: Plain text
447 #: build/C/man3/mq_getattr.3:208
448 #, no-wrap
449 msgid ""
450 "int\n"
451 "main(int argc, char *argv[])\n"
452 "{\n"
453 "    mqd_t mqd;\n"
454 "    struct mq_attr attr;\n"
455 msgstr ""
456 "int\n"
457 "main(int argc, char *argv[])\n"
458 "{\n"
459 "    mqd_t mqd;\n"
460 "    struct mq_attr attr;\n"
461
462 #. type: Plain text
463 #: build/C/man3/mq_getattr.3:213
464 #, no-wrap
465 msgid ""
466 "    if (argc != 2) {\n"
467 "        fprintf(stderr, \"Usage: %s mq-name\\en\", argv[0]);\n"
468 "        exit(EXIT_FAILURE);\n"
469 "    }\n"
470 msgstr ""
471 "    if (argc != 2) {\n"
472 "        fprintf(stderr, \"Usage: %s mq-name\\en\", argv[0]);\n"
473 "        exit(EXIT_FAILURE);\n"
474 "    }\n"
475
476 #. type: Plain text
477 #: build/C/man3/mq_getattr.3:217
478 #, no-wrap
479 msgid ""
480 "    mqd = mq_open(argv[1], O_CREAT | O_EXCL, S_IRUSR | S_IWUSR, NULL);\n"
481 "    if (mqd == (mqd_t) -1)\n"
482 "        errExit(\"mq_open\");\n"
483 msgstr ""
484 "    mqd = mq_open(argv[1], O_CREAT | O_EXCL, S_IRUSR | S_IWUSR, NULL);\n"
485 "    if (mqd == (mqd_t) -1)\n"
486 "        errExit(\"mq_open\");\n"
487
488 #. type: Plain text
489 #: build/C/man3/mq_getattr.3:220
490 #, no-wrap
491 msgid ""
492 "    if (mq_getattr(mqd, &attr) == -1)\n"
493 "        errExit(\"mq_getattr\");\n"
494 msgstr ""
495 "    if (mq_getattr(mqd, &attr) == -1)\n"
496 "        errExit(\"mq_getattr\");\n"
497
498 #. type: Plain text
499 #: build/C/man3/mq_getattr.3:223
500 #, no-wrap
501 msgid ""
502 "    printf(\"Maximum # of messages on queue:   %ld\\en\", attr.mq_maxmsg);\n"
503 "    printf(\"Maximum message size:             %ld\\en\", attr.mq_msgsize);\n"
504 msgstr ""
505 "    printf(\"Maximum # of messages on queue:   %ld\\en\", attr.mq_maxmsg);\n"
506 "    printf(\"Maximum message size:             %ld\\en\", attr.mq_msgsize);\n"
507
508 #. type: Plain text
509 #: build/C/man3/mq_getattr.3:226
510 #, no-wrap
511 msgid ""
512 "    if (mq_unlink(argv[1]) == -1)\n"
513 "        errExit(\"mq_unlink\");\n"
514 msgstr ""
515 "    if (mq_unlink(argv[1]) == -1)\n"
516 "        errExit(\"mq_unlink\");\n"
517
518 #. type: Plain text
519 #: build/C/man3/mq_getattr.3:229
520 #, no-wrap
521 msgid ""
522 "    exit(EXIT_SUCCESS);\n"
523 "}\n"
524 msgstr ""
525 "    exit(EXIT_SUCCESS);\n"
526 "}\n"
527
528 #. type: Plain text
529 #: build/C/man3/mq_getattr.3:238
530 msgid "B<mq_close>(3), B<mq_notify>(3), B<mq_open>(3), B<mq_receive>(3), B<mq_send>(3), B<mq_unlink>(3), B<mq_overview>(7)"
531 msgstr "B<mq_close>(3), B<mq_notify>(3), B<mq_open>(3), B<mq_receive>(3), B<mq_send>(3), B<mq_unlink>(3), B<mq_overview>(7)"
532
533 #. type: TH
534 #: build/C/man2/mq_getsetattr.2:26
535 #, no-wrap
536 msgid "MQ_GETSETATTR"
537 msgstr "MQ_GETSETATTR"
538
539 #. type: TH
540 #: build/C/man2/mq_getsetattr.2:26
541 #, no-wrap
542 msgid "2012-07-13"
543 msgstr "2012-07-13"
544
545 #. type: Plain text
546 #: build/C/man2/mq_getsetattr.2:29
547 msgid "mq_getsetattr - get/set message queue attributes"
548 msgstr "mq_getsetattr - メッセージキューの属性を設定/取得する"
549
550 #. type: Plain text
551 #: build/C/man2/mq_getsetattr.2:33
552 #, no-wrap
553 msgid ""
554 "B<#include E<lt>sys/types.hE<gt>>\n"
555 "B<#include E<lt>mqueue.hE<gt>>\n"
556 msgstr ""
557 "B<#include E<lt>sys/types.hE<gt>>\n"
558 "B<#include E<lt>mqueue.hE<gt>>\n"
559
560 #. type: Plain text
561 #: build/C/man2/mq_getsetattr.2:36
562 #, no-wrap
563 msgid ""
564 "B<int mq_getsetattr(mqd_t >I<mqdes>B<, struct mq_attr *>I<newattr>B<,>\n"
565 "B<                 struct mq_attr *>I<oldattr>B<);>\n"
566 msgstr ""
567 "B<int mq_getsetattr(mqd_t >I<mqdes>B<, struct mq_attr *>I<newattr>B<,>\n"
568 "B<                 struct mq_attr *>I<oldattr>B<);>\n"
569
570 #. type: Plain text
571 #: build/C/man2/mq_getsetattr.2:40
572 msgid "I<Note>: There is no glibc wrapper for this system call; see NOTES."
573 msgstr "I<注>: このシステムコールには glibc のラッパー関数は存在しない。「注意」の節を参照。"
574
575 #. type: Plain text
576 #: build/C/man2/mq_getsetattr.2:42
577 msgid "Do not use this system call."
578 msgstr "このシステムコールを使用しないこと。"
579
580 #. type: Plain text
581 #: build/C/man2/mq_getsetattr.2:50
582 msgid "This is the low-level system call used to implement B<mq_getattr>(3)  and B<mq_setattr>(3).  For an explanation of how this system call operates, see the description of B<mq_setattr>(3)."
583 msgstr "B<mq_getattr>(3)  と B<mq_setattr>(3)  の実装に使用される低レベルのシステムコールである。 このシステムコールがどのように動作するかは B<mq_setattr>(3)  の説明を参照のこと。"
584
585 #. type: Plain text
586 #: build/C/man2/mq_getsetattr.2:52
587 msgid "This interface is nonstandard; avoid its use."
588 msgstr "このインターフェースは非標準である。使用を避けること。"
589
590 #. type: Plain text
591 #: build/C/man2/mq_getsetattr.2:56
592 msgid "Glibc does not provide a wrapper for this system call; call it using B<syscall>(2).  (Actually, never call it unless you are writing a C library!)"
593 msgstr "glibc はこのシステムコールに対するラッパー関数を提供していない。 B<syscall>(2)  を使って呼び出すこと。 (実のところ、C ライブラリを書いているのでない限り、 決してこのシステムコールを呼び出さないこと!)"
594
595 #. type: Plain text
596 #: build/C/man2/mq_getsetattr.2:59
597 msgid "B<mq_getattr>(3), B<mq_overview>(7)"
598 msgstr "B<mq_getattr>(3), B<mq_overview>(7)"
599
600 #. type: TH
601 #: build/C/man3/mq_notify.3:26
602 #, no-wrap
603 msgid "MQ_NOTIFY"
604 msgstr "MQ_NOTIFY"
605
606 #. type: TH
607 #: build/C/man3/mq_notify.3:26
608 #, no-wrap
609 msgid "2014-04-06"
610 msgstr "2014-04-06"
611
612 #. type: Plain text
613 #: build/C/man3/mq_notify.3:29
614 msgid "mq_notify - register for notification when a message is available"
615 msgstr "mq_notify - メッセージ到着時に通知を行うよう登録する"
616
617 #. type: Plain text
618 #: build/C/man3/mq_notify.3:34
619 #, no-wrap
620 msgid "B<int mq_notify(mqd_t >I<mqdes>B<, const struct sigevent *>I<sevp>B<);>\n"
621 msgstr "B<int mq_notify(mqd_t >I<mqdes>B<, const struct sigevent *>I<notification>B<);>\n"
622
623 #. type: Plain text
624 #: build/C/man3/mq_notify.3:43
625 msgid "B<mq_notify>()  allows the calling process to register or unregister for delivery of an asynchronous notification when a new message arrives on the empty message queue referred to by the descriptor I<mqdes>."
626 msgstr "B<mq_notify>()  を使うと、ディスクリプター I<mqdes> で参照される空のメッセージキューに新しくメッセージが到着した時に 非同期の通知 (notification) の配送が行われるように登録したり、 その解除を行ったりできる。"
627
628 #. type: Plain text
629 #: build/C/man3/mq_notify.3:51
630 msgid "The I<sevp> argument is a pointer to a I<sigevent> structure.  For the definition and general details of this structure, see B<sigevent>(7)."
631 msgstr "I<sevp> 引き数は I<sigevent> 構造体へのポインターである。 この構造体の定義と一般的な詳細については B<sigevent>(7)  を参照。"
632
633 #. type: Plain text
634 #: build/C/man3/mq_notify.3:65
635 msgid "If I<sevp> is a non-null pointer, then B<mq_notify>()  registers the calling process to receive message notification.  The I<sigev_notify> field of the I<sigevent> structure to which I<sevp> points specifies how notification is to be performed.  This field has one of the following values:"
636 msgstr "I<sevp> が NULL でないポインターであれば、 B<mq_notify>()  はメッセージ通知を受け取るように呼び出し元のプロセスを登録する。 I<sevp> が指す I<sigevent> 構造体の I<sigev_notify> フィールドは、どのような通知を行うのかを指定する。 このフィールドは以下の値のいずれかを持つ。"
637
638 #. type: TP
639 #: build/C/man3/mq_notify.3:65
640 #, no-wrap
641 msgid "B<SIGEV_NONE>"
642 msgstr "B<SIGEV_NONE>"
643
644 #.  When is SIGEV_NONE useful?
645 #. type: Plain text
646 #: build/C/man3/mq_notify.3:70
647 msgid "A \"null\" notification: the calling process is registered as the target for notification, but when a message arrives, no notification is sent."
648 msgstr "「空の (null)」の通知: 呼び出し元のプロセスを通知の宛先として登録するが、 実際にはメッセージが到着した時に通知は送られない。"
649
650 #. type: TP
651 #: build/C/man3/mq_notify.3:70
652 #, no-wrap
653 msgid "B<SIGEV_SIGNAL>"
654 msgstr "B<SIGEV_SIGNAL>"
655
656 #.  I don't know of other implementations that set
657 #.  si_pid and si_uid -- MTK
658 #. type: Plain text
659 #: build/C/man3/mq_notify.3:90
660 msgid "Notify the process by sending the signal specified in I<sigev_signo>.  See B<sigevent>(7)  for general details.  The I<si_code> field of the I<siginfo_t> structure will be set to B<SI_MESGQ>.  In addition, I<si_pid> will be set to the PID of the process that sent the message, and I<si_uid> will be set to the real user ID of the sending process."
661 msgstr "I<sigev_signo> で指定されたシグナルを送って、プロセスに通知する。 一般的な詳細については B<sigevent>(7)  を参照。 I<siginfo_t> 構造体の I<si_code> フィールドには B<SI_MESGQ> が設定される。 さらに、 I<si_pid> にはメッセージを送信したプロセスの PID が、 I<si_uid> には送信プロセスの実ユーザー ID が設定される。"
662
663 #. type: TP
664 #: build/C/man3/mq_notify.3:90
665 #, no-wrap
666 msgid "B<SIGEV_THREAD>"
667 msgstr "B<SIGEV_THREAD>"
668
669 #. type: Plain text
670 #: build/C/man3/mq_notify.3:98
671 msgid "Upon message delivery, invoke I<sigev_notify_function> as if it were the start function of a new thread.  See B<sigevent>(7)  for details."
672 msgstr "メッセージの配送時には、 I<sigev_notify_function> があたかも新しいスレッドの開始関数であるかのように起動される。 詳細は B<sigevent>(7)  を参照。"
673
674 #. type: Plain text
675 #: build/C/man3/mq_notify.3:101
676 msgid "Only one process can be registered to receive notification from a message queue."
677 msgstr "一つのメッセージキューから通知を受信するように登録できるプロセスは 一つだけである。"
678
679 #. type: Plain text
680 #: build/C/man3/mq_notify.3:108
681 msgid "If I<sevp> is NULL, and the calling process is currently registered to receive notifications for this message queue, then the registration is removed; another process can then register to receive a message notification for this queue."
682 msgstr "I<sevp> が NULL で、かつ呼び出し元のプロセスがこのメッセージキューからの 通知を受信するに現在登録している場合、登録を削除する。 これ以降、別のプロセスがこのメッセージキューから通知を受信するように 登録できるようになる。"
683
684 #. type: Plain text
685 #: build/C/man3/mq_notify.3:115
686 msgid "Message notification occurs only when a new message arrives and the queue was previously empty.  If the queue was not empty at the time B<mq_notify>()  was called, then a notification will occur only after the queue is emptied and a new message arrives."
687 msgstr "メッセージ通知は、それまで空のキューに新しいメッセージが到着した 場合にのみ行われる。 B<mq_notify>()  が呼び出された時にそのキューが空でない場合、 そのキューが空になり、その後新しいメッセージが到着した時に 初めて通知が行われることになる。"
688
689 #. type: Plain text
690 #: build/C/man3/mq_notify.3:123
691 msgid "If another process or thread is waiting to read a message from an empty queue using B<mq_receive>(3), then any message notification registration is ignored: the message is delivered to the process or thread calling B<mq_receive>(3), and the message notification registration remains in effect."
692 msgstr "別のプロセスやスレッドが B<mq_receive>(3)  を使って、空のキューからメッセージの読み出しを待っている場合、 メッセージ通知の登録は全て無視される。 メッセージは B<mq_receive>(3)  を呼び出しているプロセスやスレッドに配送され、 メッセージ通知の登録は効力を持ったままとなる。"
693
694 #. type: Plain text
695 #: build/C/man3/mq_notify.3:134
696 msgid "Notification occurs once: after a notification is delivered, the notification registration is removed, and another process can register for message notification.  If the notified process wishes to receive the next notification, it can use B<mq_notify>()  to request a further notification.  This should be done before emptying all unread messages from the queue.  (Placing the queue in nonblocking mode is useful for emptying the queue of messages without blocking once it is empty.)"
697 msgstr "通知は一度だけ行われる。通知が送られた後は、通知要求の登録は削除され、 別のプロセスがメッセージ通知を受信するように登録できるようになる。 通知を受けたプロセスが次の通知も受信したい場合は、 B<mq_notify>()  を使ってその後の通知も受けるように要求することができる。 B<mq_notify>()  を再度呼び出すのは、読み出していないメッセージを全部読み出して キューが空になる前にすべきである (キューからのメッセージ読み出しをキューが空になった時に 停止 (block) せずに行うには、キューを非停止モード (non-blocking mode)  に設定しておくとよい)。"
698
699 #. type: Plain text
700 #: build/C/man3/mq_notify.3:140
701 msgid "On success B<mq_notify>()  returns 0; on error, -1 is returned, with I<errno> set to indicate the error."
702 msgstr "成功すると、 B<mq_notify>()  は 0 を返す。エラーの場合、-1 を返し、 I<errno> をエラーを示す値に設定する。"
703
704 #. type: TP
705 #: build/C/man3/mq_notify.3:146
706 #, no-wrap
707 msgid "B<EBUSY>"
708 msgstr "B<EBUSY>"
709
710 #. type: Plain text
711 #: build/C/man3/mq_notify.3:150
712 msgid "Another process has already registered to receive notification for this message queue."
713 msgstr "別のプロセスがすでに このメッセージキューに対する通知を受信するように登録している。"
714
715 #. type: Plain text
716 #: build/C/man3/mq_notify.3:160
717 msgid "I<sevp-E<gt>sigev_notify> is not one of the permitted values; or I<sevp-E<gt>sigev_notify> is B<SIGEV_SIGNAL> and I<sevp-E<gt>sigev_signo> is not a valid signal number."
718 msgstr "I<sevp-E<gt>sigev_notify> が許可された値のいずれでもない。もしくは I<sevp-E<gt>sigev_notify> が B<SIGEV_SIGNAL> だが I<sevp-E<gt>sigev_signo> が有効なシグナル番号ではない。"
719
720 #. type: TP
721 #: build/C/man3/mq_notify.3:160 build/C/man3/mq_open.3:227
722 #: build/C/man2/msgget.2:172 build/C/man2/msgop.2:394
723 #, no-wrap
724 msgid "B<ENOMEM>"
725 msgstr "B<ENOMEM>"
726
727 #. type: Plain text
728 #: build/C/man3/mq_notify.3:163 build/C/man3/mq_open.3:230
729 msgid "Insufficient memory."
730 msgstr "十分なメモリーがない。"
731
732 #.  Linux does not do this
733 #. type: Plain text
734 #: build/C/man3/mq_notify.3:174
735 msgid "POSIX.1-2008 says that an implementation I<may> generate an B<EINVAL> error if I<sevp> is NULL, and the caller is not currently registered to receive notifications for the queue I<mqdes>."
736 msgstr "POSIX.1-2008 では、 I<sevp> が NULL で、呼び出し元のプロセスがキュー I<mqdes> に関する通知を受信するように登録されていない場合、エラー B<EINVAL> を生成するような実装を行っても「よい」ことになっている。"
737
738 #. type: Plain text
739 #: build/C/man3/mq_notify.3:182
740 msgid "The following program registers a notification request for the message queue named in its command-line argument.  Notification is performed by creating a thread.  The thread executes a function which reads one message from the queue and then terminates the process."
741 msgstr "以下のプログラムは、 コマンドライン引き数で指定された名前のメッセージキューへの 通知要求を登録し、通知はスレッドの作成によって行われる。 そのスレッドは、そのキューからメッセージを一つ読み出してから、 プロセスを終了する関数を実行する。"
742
743 #. type: Plain text
744 #: build/C/man3/mq_notify.3:189
745 #, no-wrap
746 msgid ""
747 "#include E<lt>pthread.hE<gt>\n"
748 "#include E<lt>mqueue.hE<gt>\n"
749 "#include E<lt>stdio.hE<gt>\n"
750 "#include E<lt>stdlib.hE<gt>\n"
751 "#include E<lt>unistd.hE<gt>\n"
752 msgstr ""
753 "#include E<lt>pthread.hE<gt>\n"
754 "#include E<lt>mqueue.hE<gt>\n"
755 "#include E<lt>stdio.hE<gt>\n"
756 "#include E<lt>stdlib.hE<gt>\n"
757 "#include E<lt>unistd.hE<gt>\n"
758
759 #. type: Plain text
760 #: build/C/man3/mq_notify.3:192
761 #, no-wrap
762 msgid ""
763 "#define handle_error(msg) \\e\n"
764 "    do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
765 msgstr ""
766 "#define handle_error(msg) \\e\n"
767 "    do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
768
769 #. type: Plain text
770 #: build/C/man3/mq_notify.3:200
771 #, no-wrap
772 msgid ""
773 "static void                     /* Thread start function */\n"
774 "tfunc(union sigval sv)\n"
775 "{\n"
776 "    struct mq_attr attr;\n"
777 "    ssize_t nr;\n"
778 "    void *buf;\n"
779 "    mqd_t mqdes = *((mqd_t *) sv.sival_ptr);\n"
780 msgstr ""
781 "static void                     /* スレッド開始関数 */\n"
782 "tfunc(union sigval sv)\n"
783 "{\n"
784 "    struct mq_attr attr;\n"
785 "    ssize_t nr;\n"
786 "    void *buf;\n"
787 "    mqd_t mqdes = *((mqd_t *) sv.sival_ptr);\n"
788
789 #. type: Plain text
790 #: build/C/man3/mq_notify.3:202
791 #, no-wrap
792 msgid "    /* Determine max. msg size; allocate buffer to receive msg */\n"
793 msgstr ""
794 "    /* 最大メッセージサイズを決定し、\n"
795 "       メッセージ受信用のバッファーを確保する */\n"
796
797 #. type: Plain text
798 #: build/C/man3/mq_notify.3:208
799 #, no-wrap
800 msgid ""
801 "    if (mq_getattr(mqdes, &attr) == -1)\n"
802 "        handle_error(\"mq_getattr\");\n"
803 "    buf = malloc(attr.mq_msgsize);\n"
804 "    if (buf == NULL)\n"
805 "        handle_error(\"malloc\");\n"
806 msgstr ""
807 "    if (mq_getattr(mqdes, &attr) == -1)\n"
808 "        handle_error(\"mq_getattr\");\n"
809 "    buf = malloc(attr.mq_msgsize);\n"
810 "    if (buf == NULL)\n"
811 "        handle_error(\"malloc\");\n"
812
813 #. type: Plain text
814 #: build/C/man3/mq_notify.3:212
815 #, no-wrap
816 msgid ""
817 "    nr = mq_receive(mqdes, buf, attr.mq_msgsize, NULL);\n"
818 "    if (nr == -1)\n"
819 "        handle_error(\"mq_receive\");\n"
820 msgstr ""
821 "    nr = mq_receive(mqdes, buf, attr.mq_msgsize, NULL);\n"
822 "    if (nr == -1)\n"
823 "        handle_error(\"mq_receive\");\n"
824
825 #. type: Plain text
826 #: build/C/man3/mq_notify.3:217
827 #, no-wrap
828 msgid ""
829 "    printf(\"Read %zd bytes from MQ\\en\", nr);\n"
830 "    free(buf);\n"
831 "    exit(EXIT_SUCCESS);         /* Terminate the process */\n"
832 "}\n"
833 msgstr ""
834 "    printf(\"Read %zd bytes from MQ\\en\", nr);\n"
835 "    free(buf);\n"
836 "    exit(EXIT_SUCCESS);         /* プロセスを終了する */\n"
837 "}\n"
838
839 #. type: Plain text
840 #: build/C/man3/mq_notify.3:223
841 #, no-wrap
842 msgid ""
843 "int\n"
844 "main(int argc, char *argv[])\n"
845 "{\n"
846 "    mqd_t mqdes;\n"
847 "    struct sigevent sev;\n"
848 msgstr ""
849 "int\n"
850 "main(int argc, char *argv[])\n"
851 "{\n"
852 "    mqd_t mqdes;\n"
853 "    struct sigevent sev;\n"
854
855 #. type: Plain text
856 #: build/C/man3/mq_notify.3:228
857 #, no-wrap
858 msgid ""
859 "    if (argc != 2) {\n"
860 "        fprintf(stderr, \"Usage: %s E<lt>mq-nameE<gt>\\en\", argv[0]);\n"
861 "        exit(EXIT_FAILURE);\n"
862 "    }\n"
863 msgstr ""
864 "    if (argc != 2) {\n"
865 "        fprintf(stderr, \"Usage: %s E<lt>mq-nameE<gt>\\en\", argv[0]);\n"
866 "        exit(EXIT_FAILURE);\n"
867 "    }\n"
868
869 #. type: Plain text
870 #: build/C/man3/mq_notify.3:232
871 #, no-wrap
872 msgid ""
873 "    mqdes = mq_open(argv[1], O_RDONLY);\n"
874 "    if (mqdes == (mqd_t) -1)\n"
875 "        handle_error(\"mq_open\");\n"
876 msgstr ""
877 "    mqdes = mq_open(argv[1], O_RDONLY);\n"
878 "    if (mqdes == (mqd_t) -1)\n"
879 "        handle_error(\"mq_open\");\n"
880
881 #. type: Plain text
882 #: build/C/man3/mq_notify.3:239
883 #, no-wrap
884 msgid ""
885 "    sev.sigev_notify = SIGEV_THREAD;\n"
886 "    sev.sigev_notify_function = tfunc;\n"
887 "    sev.sigev_notify_attributes = NULL;\n"
888 "    sev.sigev_value.sival_ptr = &mqdes;   /* Arg. to thread func. */\n"
889 "    if (mq_notify(mqdes, &sev) == -1)\n"
890 "        handle_error(\"mq_notify\");\n"
891 msgstr ""
892 "    sev.sigev_notify = SIGEV_THREAD;\n"
893 "    sev.sigev_notify_function = tfunc;\n"
894 "    sev.sigev_notify_attributes = NULL;\n"
895 "    sev.sigev_value.sival_ptr = &mqdes;   /* スレッド関数に渡す引き数 */\n"
896 "    if (mq_notify(mqdes, &sev) == -1)\n"
897 "        handle_error(\"mq_notify\");\n"
898
899 #. type: Plain text
900 #: build/C/man3/mq_notify.3:242
901 #, no-wrap
902 msgid ""
903 "    pause();    /* Process will be terminated by thread function */\n"
904 "}\n"
905 msgstr ""
906 "    pause();    /* プロセスはスレッド関数により終了される */\n"
907 "}\n"
908
909 #. type: Plain text
910 #: build/C/man3/mq_notify.3:252
911 msgid "B<mq_close>(3), B<mq_getattr>(3), B<mq_open>(3), B<mq_receive>(3), B<mq_send>(3), B<mq_unlink>(3), B<mq_overview>(7), B<sigevent>(7)"
912 msgstr "B<mq_close>(3), B<mq_getattr>(3), B<mq_open>(3), B<mq_receive>(3), B<mq_send>(3), B<mq_unlink>(3), B<mq_overview>(7), B<sigevent>(7)"
913
914 #. type: TH
915 #: build/C/man3/mq_open.3:26
916 #, no-wrap
917 msgid "MQ_OPEN"
918 msgstr "MQ_OPEN"
919
920 #. type: TH
921 #: build/C/man3/mq_open.3:26
922 #, no-wrap
923 msgid "2014-12-31"
924 msgstr "2014-12-31"
925
926 #. type: Plain text
927 #: build/C/man3/mq_open.3:29
928 msgid "mq_open - open a message queue"
929 msgstr "mq_open - メッセージキューをオープンする"
930
931 #. type: Plain text
932 #: build/C/man3/mq_open.3:34
933 #, no-wrap
934 msgid ""
935 "B<#include E<lt>fcntl.hE<gt>>           /* For O_* constants */\n"
936 "B<#include E<lt>sys/stat.hE<gt>>        /* For mode constants */\n"
937 "B<#include E<lt>mqueue.hE<gt>>\n"
938 msgstr ""
939 "B<#include E<lt>fcntl.hE<gt>>           /* For O_* constants */\n"
940 "B<#include E<lt>sys/stat.hE<gt>>        /* For mode constants */\n"
941 "B<#include E<lt>mqueue.hE<gt>>\n"
942
943 #. type: Plain text
944 #: build/C/man3/mq_open.3:38
945 #, no-wrap
946 msgid ""
947 "B<mqd_t mq_open(const char *>I<name>B<, int >I<oflag>B<);>\n"
948 "B<mqd_t mq_open(const char *>I<name>B<, int >I<oflag>B<, mode_t >I<mode>B<,>\n"
949 "B<              struct mq_attr *>I<attr>B<);>\n"
950 msgstr ""
951 "B<mqd_t mq_open(const char *>I<name>B<, int >I<oflag>B<);>\n"
952 "B<mqd_t mq_open(const char *>I<name>B<, int >I<oflag>B<, mode_t >I<mode>B<,>\n"
953 "B<              struct mq_attr *>I<attr>B<);>\n"
954
955 #. type: Plain text
956 #: build/C/man3/mq_open.3:50
957 msgid "B<mq_open>()  creates a new POSIX message queue or opens an existing queue.  The queue is identified by I<name>.  For details of the construction of I<name>, see B<mq_overview>(7)."
958 msgstr "B<mq_open>()  は、新しい POSIX メッセージキューを作成するか、既存のキューを オープンする。キューは I<name> で識別される。 I<name> の構成の詳細については B<mq_overview (7)> を参照。"
959
960 #. type: Plain text
961 #: build/C/man3/mq_open.3:58
962 msgid "The I<oflag> argument specifies flags that control the operation of the call.  (Definitions of the flags values can be obtained by including I<E<lt>fcntl.hE<gt>>.)  Exactly one of the following must be specified in I<oflag>:"
963 msgstr "I<oflag> 引き数には、関数呼び出しの操作を制御するフラグを指定する (oflag の値の定義は I<E<lt>fcntl.hE<gt>> のインクルードにより得られる)。 I<oflag> には、以下のうちいずれか一つを必ず指定しなければならない。"
964
965 #. type: TP
966 #: build/C/man3/mq_open.3:58
967 #, no-wrap
968 msgid "B<O_RDONLY>"
969 msgstr "B<O_RDONLY>"
970
971 #. type: Plain text
972 #: build/C/man3/mq_open.3:61
973 msgid "Open the queue to receive messages only."
974 msgstr "メッセージの受信専用としてキューをオープンする。"
975
976 #. type: TP
977 #: build/C/man3/mq_open.3:61
978 #, no-wrap
979 msgid "B<O_WRONLY>"
980 msgstr "B<O_WRONLY>"
981
982 #. type: Plain text
983 #: build/C/man3/mq_open.3:64
984 msgid "Open the queue to send messages only."
985 msgstr "メッセージの送信専用としてキューをオープンする。"
986
987 #. type: TP
988 #: build/C/man3/mq_open.3:64
989 #, no-wrap
990 msgid "B<O_RDWR>"
991 msgstr "B<O_RDWR>"
992
993 #. type: Plain text
994 #: build/C/man3/mq_open.3:67
995 msgid "Open the queue to both send and receive messages."
996 msgstr "メッセージの送受信両用としてキューをオープンする。"
997
998 #. type: Plain text
999 #: build/C/man3/mq_open.3:72
1000 msgid "Zero or more of the following flags can additionally be I<OR>ed in I<oflag>:"
1001 msgstr "0 個以上の下記のフラグを、ビット単位の OR (論理和) で I<oflag> に追加で指定できる。"
1002
1003 #. type: TP
1004 #: build/C/man3/mq_open.3:72
1005 #, no-wrap
1006 msgid "B<O_CLOEXEC> (since Linux 2.6.26)"
1007 msgstr "B<O_CLOEXEC> (Linux 2.6.26 以降)"
1008
1009 #.  commit 269f21344b23e552c21c9e2d7ca258479dcd7a0a
1010 #. type: Plain text
1011 #: build/C/man3/mq_open.3:79
1012 msgid "Set the close-on-exec flag for the message queue descriptor.  See B<open>(2)  for a discussion of why this flag is useful."
1013 msgstr "メッセージキュー記述子に close-on-exec フラグをセットする。 なぜこのフラグが有用かについての議論は B<open>(2) を参照。"
1014
1015 #. type: TP
1016 #: build/C/man3/mq_open.3:79
1017 #, no-wrap
1018 msgid "B<O_CREAT>"
1019 msgstr "B<O_CREAT>"
1020
1021 #.  In reality the filesystem IDs are used on Linux.
1022 #. type: Plain text
1023 #: build/C/man3/mq_open.3:87
1024 msgid "Create the message queue if it does not exist.  The owner (user ID) of the message queue is set to the effective user ID of the calling process.  The group ownership (group ID) is set to the effective group ID of the calling process."
1025 msgstr "存在しない場合、メッセージキューを作成する。 メッセージキューの所有者 (ユーザー ID) とグループ所有権 (グループ ID) は、 それぞれ呼び出し元プロセスの実効ユーザー ID と実効グループ ID に設定される。"
1026
1027 #. type: TP
1028 #: build/C/man3/mq_open.3:87
1029 #, no-wrap
1030 msgid "B<O_EXCL>"
1031 msgstr "B<O_EXCL>"
1032
1033 #. type: Plain text
1034 #: build/C/man3/mq_open.3:97
1035 msgid "If B<O_CREAT> was specified in I<oflag>, and a queue with the given I<name> already exists, then fail with the error B<EEXIST>."
1036 msgstr "B<O_CREAT> が I<oflag> に指定され、かつ指定された名前 I<name> を持つキューがすでに存在する場合、エラー B<EEXIST> で失敗する。"
1037
1038 #. type: TP
1039 #: build/C/man3/mq_open.3:97
1040 #, no-wrap
1041 msgid "B<O_NONBLOCK>"
1042 msgstr "B<O_NONBLOCK>"
1043
1044 #. type: Plain text
1045 #: build/C/man3/mq_open.3:106
1046 msgid "Open the queue in nonblocking mode.  In circumstances where B<mq_receive>(3)  and B<mq_send>(3)  would normally block, these functions instead fail with the error B<EAGAIN>."
1047 msgstr "非停止 (nonblocking) モードでキューをオープンする。 B<mq_receive>(3)  と B<mq_send>(3)  は、通常は停止 (block) する状況において、エラー B<EAGAIN> で失敗するようになる。"
1048
1049 #. type: Plain text
1050 #: build/C/man3/mq_open.3:120
1051 msgid "If B<O_CREAT> is specified in I<oflag>, then two additional arguments must be supplied.  The I<mode> argument specifies the permissions to be placed on the new queue, as for B<open>(2).  (Symbolic definitions for the permissions bits can be obtained by including I<E<lt>sys/stat.hE<gt>>.)  The permissions settings are masked against the process umask."
1052 msgstr "I<oflag> に B<O_CREAT> を指定する場合、追加で 2つの引き数を与える必要がある。 I<mode> 引き数は、新しいキューに適用される許可設定 (permission) を、 B<open>(2)  と同じように指定する (許可ビットのシンボル定義は I<E<lt>sys/stat.hE<gt>> のインクルードにより得られる)。 許可設定はプロセスの umask でマスクされる。"
1053
1054 #. type: Plain text
1055 #: build/C/man3/mq_open.3:136
1056 msgid "The I<attr> argument specifies attributes for the queue.  See B<mq_getattr>(3)  for details.  If I<attr> is NULL, then the queue is created with implementation-defined default attributes.  Since Linux 3.5, two I</proc> files can be used to control these defaults; see B<mq_overview>(7)  for details."
1057 msgstr "I<attr> 引き数は、キューの属性を指定する。詳細は、 B<mq_getattr>(3)  を参照。 I<attr> が NULL の場合、キューは実装で定義されたデフォルト属性で作成される。 Linux 3.5 以降では、2 つの I</proc> ファイルがあり、これらのデフォルト値を制御できる。 詳細は B<mq_overview>(7) を参照。"
1058
1059 #. type: Plain text
1060 #: build/C/man3/mq_open.3:148
1061 msgid "On success, B<mq_open>()  returns a message queue descriptor for use by other message queue functions.  On error, B<mq_open>()  returns I<(mqd_t)\\ -1>, with I<errno> set to indicate the error."
1062 msgstr "成功すると、 B<mq_open>()  はメッセージキュー記述子 (message queue descriptor) を返す。 メッセージキュー記述子は他のメッセージキュー関連の関数で使用される。 エラーの場合、 B<mq_open>()  は I<(mqd_t)\\ -1> を返し、 I<errno> にエラーを示す値を設定する。"
1063
1064 #. type: TP
1065 #: build/C/man3/mq_open.3:149 build/C/man3/mq_open.3:153
1066 #: build/C/man3/mq_unlink.3:51 build/C/man2/msgctl.2:258
1067 #: build/C/man2/msgget.2:147 build/C/man2/msgop.2:358 build/C/man2/msgop.2:413
1068 #, no-wrap
1069 msgid "B<EACCES>"
1070 msgstr "B<EACCES>"
1071
1072 #. type: Plain text
1073 #: build/C/man3/mq_open.3:153
1074 msgid "The queue exists, but the caller does not have permission to open it in the specified mode."
1075 msgstr "キューは存在するが、呼び出し元が指定されたモードでそのキュー をオープンする許可を持たない。"
1076
1077 #.  Note that this isn't consistent with the same case for sem_open()
1078 #. type: Plain text
1079 #: build/C/man3/mq_open.3:158
1080 msgid "I<name> contained more than one slash."
1081 msgstr "I<name> にスラッシュが 2 個以上含まれていた。"
1082
1083 #. type: TP
1084 #: build/C/man3/mq_open.3:158 build/C/man2/msgget.2:155
1085 #, no-wrap
1086 msgid "B<EEXIST>"
1087 msgstr "B<EEXIST>"
1088
1089 #. type: Plain text
1090 #: build/C/man3/mq_open.3:169
1091 msgid "Both B<O_CREAT> and B<O_EXCL> were specified in I<oflag>, but a queue with this I<name> already exists."
1092 msgstr "I<oflag> に B<O_CREAT> と B<O_EXCL> の両方が指定されたが、指定された名前 I<name> を持つキューがすでに存在する。"
1093
1094 #. type: Plain text
1095 #: build/C/man3/mq_open.3:201
1096 msgid "B<O_CREAT> was specified in I<oflag>, and I<attr> was not NULL, but I<attr-E<gt>mq_maxmsg> or I<attr-E<gt>mq_msqsize> was invalid.  Both of these fields must be greater than zero.  In a process that is unprivileged (does not have the B<CAP_SYS_RESOURCE> capability), I<attr-E<gt>mq_maxmsg> must be less than or equal to the I<msg_max> limit, and I<attr-E<gt>mq_msgsize> must be less than or equal to the I<msgsize_max> limit.  In addition, even in a privileged process, I<attr-E<gt>mq_maxmsg> cannot exceed the B<HARD_MAX> limit.  (See B<mq_overview>(7)  for details of these limits.)"
1097 msgstr "I<oflag> に B<O_CREAT> が指定され、かつ I<attr> が NULL 以外だが、 I<attr-E<gt>mq_maxmsg> か I<attr-E<gt>mq_msqsize> が不正であった。 これらのフィールドは両方とも 0 より大きくなければならない。 プロセスが特権を持たない (B<CAP_SYS_RESOURCE> ケーパビリティを持たない) 場合、 I<attr-E<gt>mq_maxmsg> と I<attr-E<gt>mq_msgsize> は、それぞれ上限 I<msg_max>、 I<msgsize_max> 以下でなければならない。 また、特権プロセスの場合でも、 I<attr-E<gt>mq_maxmsg> は B<HARD_MAX> 上限を超えることはできない。 (これらの上限に関する詳細は B<mq_overview>(7)  を参照。)"
1098
1099 #. type: TP
1100 #: build/C/man3/mq_open.3:201
1101 #, no-wrap
1102 msgid "B<EMFILE>"
1103 msgstr "B<EMFILE>"
1104
1105 #. type: Plain text
1106 #: build/C/man3/mq_open.3:205
1107 msgid "The process already has the maximum number of files and message queues open."
1108 msgstr "そのプロセスがオープンしているファイルとメッセージキューの数が プロセス毎の上限に達している。"
1109
1110 #. type: TP
1111 #: build/C/man3/mq_open.3:205 build/C/man3/mq_unlink.3:54
1112 #, no-wrap
1113 msgid "B<ENAMETOOLONG>"
1114 msgstr "B<ENAMETOOLONG>"
1115
1116 #. type: Plain text
1117 #: build/C/man3/mq_open.3:209 build/C/man3/mq_unlink.3:58
1118 msgid "I<name> was too long."
1119 msgstr "I<name> が長過ぎる。"
1120
1121 #. type: TP
1122 #: build/C/man3/mq_open.3:209
1123 #, no-wrap
1124 msgid "B<ENFILE>"
1125 msgstr "B<ENFILE>"
1126
1127 #. type: Plain text
1128 #: build/C/man3/mq_open.3:213
1129 msgid "The system limit on the total number of open files and message queues has been reached."
1130 msgstr "システム全体でオープンしているファイルとメッセージキューの合計数が システム上限に達している。"
1131
1132 #. type: TP
1133 #: build/C/man3/mq_open.3:213 build/C/man3/mq_open.3:222
1134 #: build/C/man3/mq_unlink.3:58 build/C/man2/msgget.2:164
1135 #, no-wrap
1136 msgid "B<ENOENT>"
1137 msgstr "B<ENOENT>"
1138
1139 #. type: Plain text
1140 #: build/C/man3/mq_open.3:222
1141 msgid "The B<O_CREAT> flag was not specified in I<oflag>, and no queue with this I<name> exists."
1142 msgstr "B<O_CREAT> フラグが I<oflag> に指定されなかったが、指定された名前 I<name> を持つキューが存在しない。"
1143
1144 #.  Note that this isn't consistent with the same case for sem_open()
1145 #. type: Plain text
1146 #: build/C/man3/mq_open.3:227
1147 msgid "I<name> was just \"/\" followed by no other characters."
1148 msgstr "I<name> が \"/\" だけで、その後ろに他の文字が続いていなかった。"
1149
1150 #. type: TP
1151 #: build/C/man3/mq_open.3:230 build/C/man2/msgget.2:176
1152 #, no-wrap
1153 msgid "B<ENOSPC>"
1154 msgstr "B<ENOSPC>"
1155
1156 #. type: Plain text
1157 #: build/C/man3/mq_open.3:237
1158 msgid "Insufficient space for the creation of a new message queue.  This probably occurred because the I<queues_max> limit was encountered; see B<mq_overview>(7)."
1159 msgstr "新しいメッセージキューを作成するのに十分な空間がない。 このエラーはおそらく I<queues_max> 上限に抵触したため起こったのだろう。 B<mq_overview>(7)  を参照。"
1160
1161 #. type: Plain text
1162 #: build/C/man3/mq_open.3:242
1163 msgid "The B<mq_open>()  function is thread-safe."
1164 msgstr "関数 B<mq_open>() はスレッドセーフである。"
1165
1166 #. type: SH
1167 #: build/C/man3/mq_open.3:244 build/C/man7/mq_overview.7:369
1168 #: build/C/man2/msgget.2:223 build/C/man2/msgop.2:543
1169 #, no-wrap
1170 msgid "BUGS"
1171 msgstr "バグ"
1172
1173 #. type: Plain text
1174 #: build/C/man3/mq_open.3:248
1175 msgid "In kernels before 2.6.14, the process umask was not applied to the permissions specified in I<mode>."
1176 msgstr "2.6.14 より前のカーネルには、 プロセスの umask が I<mode> で指定された許可設定に適用されなかった。"
1177
1178 #. type: Plain text
1179 #: build/C/man3/mq_open.3:256
1180 msgid "B<mq_close>(3), B<mq_getattr>(3), B<mq_notify>(3), B<mq_receive>(3), B<mq_send>(3), B<mq_unlink>(3), B<mq_overview>(7)"
1181 msgstr "B<mq_close>(3), B<mq_getattr>(3), B<mq_notify>(3), B<mq_receive>(3), B<mq_send>(3), B<mq_unlink>(3), B<mq_overview>(7)"
1182
1183 #. type: TH
1184 #: build/C/man7/mq_overview.7:26
1185 #, no-wrap
1186 msgid "MQ_OVERVIEW"
1187 msgstr "MQ_OVERVIEW"
1188
1189 #. type: TH
1190 #: build/C/man7/mq_overview.7:26
1191 #, no-wrap
1192 msgid "2014-09-21"
1193 msgstr "2014-09-21"
1194
1195 #. type: Plain text
1196 #: build/C/man7/mq_overview.7:29
1197 msgid "mq_overview - overview of POSIX message queues"
1198 msgstr "mq_overview - POSIX メッセージキューの概要"
1199
1200 #. type: Plain text
1201 #: build/C/man7/mq_overview.7:37
1202 msgid "POSIX message queues allow processes to exchange data in the form of messages.  This API is distinct from that provided by System V message queues (B<msgget>(2), B<msgsnd>(2), B<msgrcv>(2), etc.), but provides similar functionality."
1203 msgstr "POSIX メッセージキューを使用すると、プロセス間で メッセージの形でのデータのやり取りを行うことができる。 この API は System V メッセージキューの API (B<msgget>(2), B<msgsnd>(2), B<msgrcv>(2)  など) とは異なるものだが、同様の機能を提供する。"
1204
1205 #. type: Plain text
1206 #: build/C/man7/mq_overview.7:52
1207 msgid "Message queues are created and opened using B<mq_open>(3); this function returns a I<message queue descriptor> (I<mqd_t>), which is used to refer to the open message queue in later calls.  Each message queue is identified by a name of the form I</somename>; that is, a null-terminated string of up to B<NAME_MAX> (i.e., 255) characters consisting of an initial slash, followed by one or more characters, none of which are slashes.  Two processes can operate on the same queue by passing the same name to B<mq_open>(3)."
1208 msgstr "メッセージキューの作成とオープンは B<mq_open>(3)  を使って行う。この関数は I<メッセージキュー記述子 (message queue descriptor)> (I<mqd_t>)  を返す。これ以降のコールでは、オープンされたメッセージキューは I<メッセージキュー記述子> を使って参照される。 各メッセージキューは I</somename> の形の名前で区別することができる。 その名前は、最大で B<NAME_MAX> (すなわち 255) 文字のヌル終端された文字列で、 スラッシュで始まり、スラッシュ以外の文字が 1 文字以上続く形式である。 B<mq_open>(3)  に同じ名前を渡すことで、2つのプロセスで同一のキューを 操作することができる。"
1209
1210 #. type: Plain text
1211 #: build/C/man7/mq_overview.7:68
1212 msgid "Messages are transferred to and from a queue using B<mq_send>(3)  and B<mq_receive>(3).  When a process has finished using the queue, it closes it using B<mq_close>(3), and when the queue is no longer required, it can be deleted using B<mq_unlink>(3).  Queue attributes can be retrieved and (in some cases) modified using B<mq_getattr>(3)  and B<mq_setattr>(3).  A process can request asynchronous notification of the arrival of a message on a previously empty queue using B<mq_notify>(3)."
1213 msgstr "メッセージのキューへの送受信は B<mq_send>(3)  と B<mq_receive>(3)  を使って行う。プロセスがキューの使用を終えるときには、 B<mq_close>(3)  を使ってキューをクローズする。キューがもはや不要となった場合には、 B<mq_unlink>(3)  を使ってキューを削除できる。キューの属性は B<mq_getattr>(3)  で取得でき、 (制限はあるが)  B<mq_setattr>(3)  で変更できる。 B<mq_notify>(3)  を使うことで、空のキューへのメッセージ到着を非同期で 通知するように要求することもできる。"
1214
1215 #. type: Plain text
1216 #: build/C/man7/mq_overview.7:81
1217 msgid "A message queue descriptor is a reference to an I<open message queue description> (cf.  B<open>(2)).  After a B<fork>(2), a child inherits copies of its parent's message queue descriptors, and these descriptors refer to the same open message queue descriptions as the corresponding descriptors in the parent.  Corresponding descriptors in the two processes share the flags (I<mq_flags>)  that are associated with the open message queue description."
1218 msgstr "メッセージキュー記述子は I<オープンメッセージキュー記述 (open message queue description)> への参照である (B<open>(2)  も参照)。 B<fork>(2)  実行後は、子プロセスは親プロセスのメッセージキュー記述子のコピーを継承する。 これらの記述子は、親プロセスの対応する記述子と同じオープンメッセージキュー 記述を参照している。親プロセスと子プロセスの対応する記述子は、フラグ (I<mq_flags>)  を共有する。なぜなら、フラグはオープンメッセージキュー記述に 関連付けられているからである。"
1219
1220 #. type: Plain text
1221 #: build/C/man7/mq_overview.7:94
1222 msgid "Each message has an associated I<priority>, and messages are always delivered to the receiving process highest priority first.  Message priorities range from 0 (low) to I<sysconf(_SC_MQ_PRIO_MAX)\\ -\\ 1> (high).  On Linux, I<sysconf(_SC_MQ_PRIO_MAX)> returns 32768, but POSIX.1-2001 requires only that an implementation support at least priorities in the range 0 to 31; some implementations provide only this range."
1223 msgstr "各メッセージにはそれぞれ I<優先度 (priority)> があり、メッセージの受信プロセスへの配送は常に 優先度の高いメッセージから順に行われる。 メッセージの優先度は 0 (低優先) から I<sysconf(_SC_MQ_PRIO_MAX)\\ -\\ 1> (高優先) の値を持つ。 Linux では、 I<sysconf(_SC_MQ_PRIO_MAX)> は 32768 を返すが、 POSIX.1-2001 で要求されているのは最低限 0 から 31 までの優先度を実装することだけであり、実装によってはこの範囲の優先度しかサポートされていない。"
1224
1225 #. type: Plain text
1226 #: build/C/man7/mq_overview.7:97
1227 msgid "The remainder of this section describes some specific details of the Linux implementation of POSIX message queues."
1228 msgstr "この節の残りでは、POSIX メッセージキューの Linux の実装の詳細 について説明する。"
1229
1230 #. type: SS
1231 #: build/C/man7/mq_overview.7:97
1232 #, no-wrap
1233 msgid "Library interfaces and system calls"
1234 msgstr "ライブラリインターフェースとシステムコール"
1235
1236 #. type: Plain text
1237 #: build/C/man7/mq_overview.7:103
1238 msgid "In most cases the B<mq_*>()  library interfaces listed above are implemented on top of underlying system calls of the same name.  Deviations from this scheme are indicated in the following table:"
1239 msgstr "ほとんどの場合、上記の B<mq_*>() ライブラリインターフェースは、同じ名前の下位層のシステムコールを 使って実装されている。この枠組みにあてはまらないものを 以下の表に示す。"
1240
1241 #. type: tbl table
1242 #: build/C/man7/mq_overview.7:107
1243 #, no-wrap
1244 msgid "Library interface\tSystem call\n"
1245 msgstr "Library interface\tSystem call\n"
1246
1247 #. type: tbl table
1248 #: build/C/man7/mq_overview.7:108
1249 #, no-wrap
1250 msgid "mq_close(3)\tclose(2)\n"
1251 msgstr "mq_close(3)\tclose(2)\n"
1252
1253 #. type: tbl table
1254 #: build/C/man7/mq_overview.7:109
1255 #, no-wrap
1256 msgid "mq_getattr(3)\tmq_getsetattr(2)\n"
1257 msgstr "mq_getattr(3)\tmq_getsetattr(2)\n"
1258
1259 #. type: tbl table
1260 #: build/C/man7/mq_overview.7:110
1261 #, no-wrap
1262 msgid "mq_notify(3)\tmq_notify(2)\n"
1263 msgstr "mq_notify(3)\tmq_notify(2)\n"
1264
1265 #. type: tbl table
1266 #: build/C/man7/mq_overview.7:111
1267 #, no-wrap
1268 msgid "mq_open(3)\tmq_open(2)\n"
1269 msgstr "mq_open(3)\tmq_open(2)\n"
1270
1271 #. type: tbl table
1272 #: build/C/man7/mq_overview.7:112
1273 #, no-wrap
1274 msgid "mq_receive(3)\tmq_timedreceive(2)\n"
1275 msgstr "mq_receive(3)\tmq_timedreceive(2)\n"
1276
1277 #. type: tbl table
1278 #: build/C/man7/mq_overview.7:113
1279 #, no-wrap
1280 msgid "mq_send(3)\tmq_timedsend(2)\n"
1281 msgstr "mq_send(3)\tmq_timedsend(2)\n"
1282
1283 #. type: tbl table
1284 #: build/C/man7/mq_overview.7:114
1285 #, no-wrap
1286 msgid "mq_setattr(3)\tmq_getsetattr(2)\n"
1287 msgstr "mq_setattr(3)\tmq_getsetattr(2)\n"
1288
1289 #. type: tbl table
1290 #: build/C/man7/mq_overview.7:115
1291 #, no-wrap
1292 msgid "mq_timedreceive(3)\tmq_timedreceive(2)\n"
1293 msgstr "mq_timedreceive(3)\tmq_timedreceive(2)\n"
1294
1295 #. type: tbl table
1296 #: build/C/man7/mq_overview.7:116
1297 #, no-wrap
1298 msgid "mq_timedsend(3)\tmq_timedsend(2)\n"
1299 msgstr "mq_timedsend(3)\tmq_timedsend(2)\n"
1300
1301 #. type: tbl table
1302 #: build/C/man7/mq_overview.7:117
1303 #, no-wrap
1304 msgid "mq_unlink(3)\tmq_unlink(2)\n"
1305 msgstr "mq_unlink(3)\tmq_unlink(2)\n"
1306
1307 #. type: SS
1308 #: build/C/man7/mq_overview.7:120
1309 #, no-wrap
1310 msgid "Versions"
1311 msgstr "バージョン"
1312
1313 #. type: Plain text
1314 #: build/C/man7/mq_overview.7:123
1315 msgid "POSIX message queues have been supported on Linux since kernel 2.6.6.  Glibc support has been provided since version 2.3.4."
1316 msgstr "Linux では POSIX メッセージキューはカーネル 2.6.6 以降でサポートされている。 glibc ではバージョン 2.3.4 以降でサポートされている。"
1317
1318 #. type: SS
1319 #: build/C/man7/mq_overview.7:123
1320 #, no-wrap
1321 msgid "Kernel configuration"
1322 msgstr "カーネルの設定"
1323
1324 #. type: Plain text
1325 #: build/C/man7/mq_overview.7:128
1326 msgid "Support for POSIX message queues is configurable via the B<CONFIG_POSIX_MQUEUE> kernel configuration option.  This option is enabled by default."
1327 msgstr "POSIX メッセージキューのサポートは、カーネルの設定 (configuration)  オプション B<CONFIG_POSIX_MQUEUE> で設定可能である。このオプションはデフォルトでは有効である。"
1328
1329 #. type: SS
1330 #: build/C/man7/mq_overview.7:128
1331 #, no-wrap
1332 msgid "Persistence"
1333 msgstr "持続性"
1334
1335 #. type: Plain text
1336 #: build/C/man7/mq_overview.7:133
1337 msgid "POSIX message queues have kernel persistence: if not removed by B<mq_unlink>(3), a message queue will exist until the system is shut down."
1338 msgstr "POSIX メッセージキューはカーネル内で保持される。 B<mq_unlink>(3)  で削除されなければ、メッセージキューは システムがシャットダウンされるまで存在し続ける。"
1339
1340 #. type: SS
1341 #: build/C/man7/mq_overview.7:133
1342 #, no-wrap
1343 msgid "Linking"
1344 msgstr "リンク"
1345
1346 #. type: Plain text
1347 #: build/C/man7/mq_overview.7:138
1348 msgid "Programs using the POSIX message queue API must be compiled with I<cc -lrt> to link against the real-time library, I<librt>."
1349 msgstr "POSIX メッセージキュー API を使用したプログラムは I<cc -lrt> でコンパイルし、リアルタイムライブラリ I<librt> とリンクしなければならない。"
1350
1351 #. type: SS
1352 #: build/C/man7/mq_overview.7:138
1353 #, no-wrap
1354 msgid "/proc interfaces"
1355 msgstr "/proc インターフェース"
1356
1357 #. type: Plain text
1358 #: build/C/man7/mq_overview.7:142
1359 msgid "The following interfaces can be used to limit the amount of kernel memory consumed by POSIX message queues and to set the default attributes for new message queues:"
1360 msgstr "以下のインターフェースを使って、 POSIX メッセージキューが消費するカーネル メモリーの量を制限したり、 新規のメッセージキューのデフォルト属性を設定したりすることができる。"
1361
1362 #. type: TP
1363 #: build/C/man7/mq_overview.7:142
1364 #, no-wrap
1365 msgid "I</proc/sys/fs/mqueue/msg_default> (since Linux 3.5)"
1366 msgstr "I</proc/sys/fs/mqueue/msg_default> (Linux 3.5 以降)"
1367
1368 #. type: Plain text
1369 #: build/C/man7/mq_overview.7:166
1370 msgid "This file defines the value used for a new queue's I<mq_maxmsg> setting when the queue is created with a call to B<mq_open>(3)  where I<attr> is specified as NULL.  The default value for this file is 10.  The minimum and maximum are as for I</proc/sys/fs/mqueue/msg_max>.  A new queue's default I<mq_maxmsg> value will be the smaller of I<msg_default> and I<msg_max>.  Up until Linux 2.6.28, the default I<mq_maxmsg> was 10; from Linux 2.6.28 to Linux 3.4, the default was the value defined for the I<msg_max> limit."
1371 msgstr "このファイルは、I<attr> に NULL を指定して B<mq_open>(3) を呼び出してキューが作成された際に、 その新規キューの I<mq_maxmsg> 設定に使用される値を定めている。 このファイルのデフォルト値は 10 である。 最小値と最大値は I</proc/sys/fs/mqueue/msg_max> と同様である。 新規キューのデフォルトの I<mq_maxmsg> 値は I<msg_default> と I<msg_max> の小さい方となる。 Linux 2.6.28 より前は、デフォルトの I<mq_maxmsg> は 10 であった。 Linux 2.6.28 から Linux 3.4 までは、 デフォルト値は I<msg_max> 上限で規定される値であった。"
1372
1373 #. type: TP
1374 #: build/C/man7/mq_overview.7:166
1375 #, no-wrap
1376 msgid "I</proc/sys/fs/mqueue/msg_max>"
1377 msgstr "I</proc/sys/fs/mqueue/msg_max>"
1378
1379 #. type: Plain text
1380 #: build/C/man7/mq_overview.7:187
1381 msgid "This file can be used to view and change the ceiling value for the maximum number of messages in a queue.  This value acts as a ceiling on the I<attr-E<gt>mq_maxmsg> argument given to B<mq_open>(3).  The default value for I<msg_max> is 10.  The minimum value is 1 (10 in kernels before 2.6.28).  The upper limit is B<HARD_MSGMAX>.  The I<msg_max> limit is ignored for privileged processes (B<CAP_SYS_RESOURCE>), but the B<HARD_MSGMAX> ceiling is nevertheless imposed."
1382 msgstr "このファイルを使って、一つのキューに入れられるメッセージの最大数の 上限値を参照したり変更したりできる。この値は、 B<mq_open>(3)  に渡す I<attr-E<gt>mq_maxmsg> 引き数に対する上限値として機能する。 I<msg_max> のデフォルト値は 10 で、 最小値は 1 (2.6.28 より前のカーネルでは 10) である。 I<msg_max> に指定できる上限値は B<HARD_MSGMAX> である。 I<msg_max> 上限は特権プロセス (B<CAP_SYS_RESOURCE>)  では無視されるが、上限値 B<HARD_MSGMAX> はどんな場合にでも適用される。"
1383
1384 #. type: Plain text
1385 #: build/C/man7/mq_overview.7:191
1386 msgid "The definition of B<HARD_MSGMAX> has changed across kernel versions:"
1387 msgstr "B<HARD_MSGMAX> の定義はカーネルのバージョンにより異なる。"
1388
1389 #. type: IP
1390 #: build/C/man7/mq_overview.7:192 build/C/man7/mq_overview.7:195
1391 #: build/C/man7/mq_overview.7:198 build/C/man7/mq_overview.7:246
1392 #: build/C/man7/mq_overview.7:249 build/C/man7/mq_overview.7:251
1393 #: build/C/man2/msgop.2:118 build/C/man2/msgop.2:123 build/C/man2/msgop.2:147
1394 #: build/C/man2/msgop.2:154 build/C/man2/msgop.2:221 build/C/man2/msgop.2:226
1395 #: build/C/man2/msgop.2:240 build/C/man2/msgop.2:308 build/C/man2/msgop.2:310
1396 #: build/C/man2/msgop.2:316
1397 #, no-wrap
1398 msgid "*"
1399 msgstr "*"
1400
1401 #. type: Plain text
1402 #: build/C/man7/mq_overview.7:195
1403 msgid "Up to Linux 2.6.32: I<131072\\ /\\ sizeof(void\\ *)>"
1404 msgstr "Linux 2.6.32 以前: I<131072\\ /\\ sizeof(void\\ *)>"
1405
1406 #. type: Plain text
1407 #: build/C/man7/mq_overview.7:198
1408 msgid "Linux 2.6.33 to 3.4: I<(32768\\ *\\ sizeof(void\\ *) / 4)>"
1409 msgstr "Linux 2.6.33 以上 3.4 以下: I<(32768\\ *\\ sizeof(void\\ *) / 4)>"
1410
1411 #.  commit 5b5c4d1a1440e94994c73dddbad7be0676cd8b9a
1412 #. type: Plain text
1413 #: build/C/man7/mq_overview.7:202
1414 msgid "Since Linux 3.5: 65,536"
1415 msgstr "Linux 3.5 以降: 65,536"
1416
1417 #. type: TP
1418 #: build/C/man7/mq_overview.7:203
1419 #, no-wrap
1420 msgid "I</proc/sys/fs/mqueue/msgsize_default> (since Linux 3.5)"
1421 msgstr "I</proc/sys/fs/mqueue/msgsize_default> (Linux 3.5 以降)"
1422
1423 #. type: Plain text
1424 #: build/C/man7/mq_overview.7:230
1425 msgid "This file defines the value used for a new queue's I<mq_msgsize> setting when the queue is created with a call to B<mq_open>(3)  where I<attr> is specified as NULL.  The default value for this file is 8192 (bytes).  The minimum and maximum are as for I</proc/sys/fs/mqueue/msgsize_max>.  If I<msgsize_default> exceeds I<msgsize_max>, a new queue's default I<mq_msgsize> value is capped to the I<msgsize_max> limit.  Up until Linux 2.6.28, the default I<mq_msgsize> was 8192; from Linux 2.6.28 to Linux 3.4, the default was the value defined for the I<msgsize_max> limit."
1426 msgstr ""
1427 "このファイルは、I<attr> に NULL を指定して B<mq_open>(3) を呼び出してキューが作成された際に、 その新規キューの I<mq_msgsize> 設定に使用される値を定めている。 このファイルのデフォルト値は 8192 バイトである。 最小値と最大値は I</proc/sys/fs/mqueue/msgsize_max> と同様である。 \n"
1428 "I<msgsize_default> が I<msgsize_max> より大きい場合は、 新規キューのデフォルトの I<mq_msgsize> 値は I<msgsize_max> 上限となる。 Linux 2.6.28 より前は、デフォルトの I<mq_msgsize> は 8192 であった。 Linux 2.6.28 から Linux 3.4 までは、 デフォルト値は I<msgsize_max> 上限で規定される値であった。"
1429
1430 #. type: TP
1431 #: build/C/man7/mq_overview.7:230
1432 #, no-wrap
1433 msgid "I</proc/sys/fs/mqueue/msgsize_max>"
1434 msgstr "I</proc/sys/fs/mqueue/msgsize_max>"
1435
1436 #. type: Plain text
1437 #: build/C/man7/mq_overview.7:245
1438 msgid "This file can be used to view and change the ceiling on the maximum message size.  This value acts as a ceiling on the I<attr-E<gt>mq_msgsize> argument given to B<mq_open>(3).  The default value for I<msgsize_max> is 8192 bytes.  The minimum value is 128 (8192 in kernels before 2.6.28).  The upper limit for I<msgsize_max> has varied across kernel versions:"
1439 msgstr "このファイルを使って、メッセージの最大サイズの上限値を参照したり変更したりできる。 この値は、 B<mq_open>(3) に渡す I<attr-E<gt>mq_msgsize> 引き数に対する上限値として機能する。 I<msgsize_max> のデフォルト値は 8192 バイトで、 最小値は 128 (2.6.28 より前のカーネルでは 8192) である。 I<msgsize_max> の上限はカーネルのバージョンにより異なる。"
1440
1441 #. type: Plain text
1442 #: build/C/man7/mq_overview.7:249
1443 msgid "Before Linux 2.6.28, the upper limit is B<INT_MAX>."
1444 msgstr "Linux 2.6.28 より前のバージョンでは、上限は B<INT_MAX> である。"
1445
1446 #. type: Plain text
1447 #: build/C/man7/mq_overview.7:251
1448 msgid "From Linux 2.6.28 to 3.4, the limit is 1,048,576."
1449 msgstr "Linux 2.6.28 から 3.4 では、上限は 1,048,576 である。"
1450
1451 #. type: Plain text
1452 #: build/C/man7/mq_overview.7:254
1453 msgid "Since Linux 3.5, the limit is 16,777,216 (B<HARD_MSGSIZEMAX>)."
1454 msgstr "Linux 3.5 以降では、上限は 16,777,216 (B<HARD_MSGSIZEMAX>) である。"
1455
1456 #. type: Plain text
1457 #: build/C/man7/mq_overview.7:263
1458 msgid "The I<msgsize_max> limit is ignored for privileged process (B<CAP_SYS_RESOURCE>), but, since Linux 3.5, the B<HARD_MSGSIZEMAX> ceiling is enforced for privileged processes."
1459 msgstr "I<msgsize_max> 上限は特権プロセス (B<CAP_SYS_RESOURCE>) では無視されるが、 Linux 3.5 以降では特権プロセスにも B<HARD_MSGSIZEMAX> という上限が適用される。"
1460
1461 #. type: TP
1462 #: build/C/man7/mq_overview.7:263
1463 #, no-wrap
1464 msgid "I</proc/sys/fs/mqueue/queues_max>"
1465 msgstr "I</proc/sys/fs/mqueue/queues_max>"
1466
1467 #. type: Plain text
1468 #: build/C/man7/mq_overview.7:275
1469 msgid "This file can be used to view and change the system-wide limit on the number of message queues that can be created.  The default value for I<queues_max> is 256.  No ceiling is imposed on the I<queues_max> limit; privileged processes (B<CAP_SYS_RESOURCE>)  can exceed the limit (but see BUGS)."
1470 msgstr "このファイルを使って、作成可能なメッセージキュー数のシステム全体での制限を参照したり変更したりできる。 I<queues_max> のデフォルト値は 256 である。 I<queues_max> に課される上限値はない。 特権プロセス (B<CAP_SYS_RESOURCE>) はこの上限値を超えてメッセージキューを作成できる。"
1471
1472 #. type: SS
1473 #: build/C/man7/mq_overview.7:275
1474 #, no-wrap
1475 msgid "Resource limit"
1476 msgstr "リソース制限"
1477
1478 #. type: Plain text
1479 #: build/C/man7/mq_overview.7:282
1480 msgid "The B<RLIMIT_MSGQUEUE> resource limit, which places a limit on the amount of space that can be consumed by all of the message queues belonging to a process's real user ID, is described in B<getrlimit>(2)."
1481 msgstr "リソース上限 B<RLIMIT_MSGQUEUE> は、プロセスの実 UID に対応する全メッセージキューが消費する メモリー空間の量に対して上限を設定する。 B<getrlimit>(2)  を参照。"
1482
1483 #. type: SS
1484 #: build/C/man7/mq_overview.7:282
1485 #, no-wrap
1486 msgid "Mounting the message queue filesystem"
1487 msgstr "メッセージキューファイルシステムのマウント"
1488
1489 #. type: Plain text
1490 #: build/C/man7/mq_overview.7:288
1491 msgid "On Linux, message queues are created in a virtual filesystem.  (Other implementations may also provide such a feature, but the details are likely to differ.)  This filesystem can be mounted (by the superuser) using the following commands:"
1492 msgstr "Linux では、メッセージキューは仮想ファイルシステム内に作成される (他の実装でも同様の機能が提供されているものもあるが、 詳細は違っているだろう)。 以下のコマンドを使うことで (スーパーユーザーは)  このファイルシステムをマウントできる:"
1493
1494 #. type: Plain text
1495 #: build/C/man7/mq_overview.7:293
1496 #, no-wrap
1497 msgid ""
1498 "#B< mkdir /dev/mqueue>\n"
1499 "#B< mount -t mqueue none /dev/mqueue>\n"
1500 msgstr ""
1501 "#B< mkdir /dev/mqueue>\n"
1502 "#B< mount -t mqueue none /dev/mqueue>\n"
1503
1504 #. type: Plain text
1505 #: build/C/man7/mq_overview.7:297
1506 msgid "The sticky bit is automatically enabled on the mount directory."
1507 msgstr "マウントしたディレクトリのスティッキービット (sticky bit) は 自動的にオンとなる。"
1508
1509 #. type: Plain text
1510 #: build/C/man7/mq_overview.7:304
1511 msgid "After the filesystem has been mounted, the message queues on the system can be viewed and manipulated using the commands usually used for files (e.g., B<ls>(1)  and B<rm>(1))."
1512 msgstr "メッセージキューファイルシステムのマウント後は、ファイルに対して 通常使うコマンド (例えば B<ls>(1)  や B<rm>(1))  を使って、システム上のメッセージキューを表示したり 操作したりできる。"
1513
1514 #. type: Plain text
1515 #: build/C/man7/mq_overview.7:307
1516 msgid "The contents of each file in the directory consist of a single line containing information about the queue:"
1517 msgstr "ディレクトリ内の各ファイルの内容は 1行であり、 キューに関する情報が表示される。"
1518
1519 #. type: Plain text
1520 #: build/C/man7/mq_overview.7:312
1521 #, no-wrap
1522 msgid ""
1523 "$B< cat /dev/mqueue/mymq>\n"
1524 "QSIZE:129     NOTIFY:2    SIGNO:0    NOTIFY_PID:8260\n"
1525 msgstr ""
1526 "$B< cat /dev/mqueue/mymq>\n"
1527 "QSIZE:129     NOTIFY:2    SIGNO:0    NOTIFY_PID:8260\n"
1528
1529 #. type: Plain text
1530 #: build/C/man7/mq_overview.7:316
1531 msgid "These fields are as follows:"
1532 msgstr "各フィールドの詳細は以下の通りである:"
1533
1534 #. type: TP
1535 #: build/C/man7/mq_overview.7:316
1536 #, no-wrap
1537 msgid "B<QSIZE>"
1538 msgstr "B<QSIZE>"
1539
1540 #. type: Plain text
1541 #: build/C/man7/mq_overview.7:319
1542 msgid "Number of bytes of data in all messages in the queue."
1543 msgstr "キューに入っている全メッセージの合計バイト数。"
1544
1545 #. type: TP
1546 #: build/C/man7/mq_overview.7:319
1547 #, no-wrap
1548 msgid "B<NOTIFY_PID>"
1549 msgstr "B<NOTIFY_PID>"
1550
1551 #. type: Plain text
1552 #: build/C/man7/mq_overview.7:325
1553 msgid "If this is nonzero, then the process with this PID has used B<mq_notify>(3)  to register for asynchronous message notification, and the remaining fields describe how notification occurs."
1554 msgstr "この値が 0 以外の場合、この値の PID を持つプロセスが B<mq_notify>(3)  を使って、非同期のメッセージ通知を行うように設定したことを示す。 どのように通知が行われるかは、以下のフィールドにより決定される。"
1555
1556 #. type: TP
1557 #: build/C/man7/mq_overview.7:325
1558 #, no-wrap
1559 msgid "B<NOTIFY>"
1560 msgstr "B<NOTIFY>"
1561
1562 #. type: Plain text
1563 #: build/C/man7/mq_overview.7:335
1564 msgid "Notification method: 0 is B<SIGEV_SIGNAL>; 1 is B<SIGEV_NONE>; and 2 is B<SIGEV_THREAD>."
1565 msgstr "通知方法: 0 は B<SIGEV_SIGNAL>; 1 は B<SIGEV_NONE>; 2 は B<SIGEV_THREAD>"
1566
1567 #. type: TP
1568 #: build/C/man7/mq_overview.7:335
1569 #, no-wrap
1570 msgid "B<SIGNO>"
1571 msgstr "B<SIGNO>"
1572
1573 #. type: Plain text
1574 #: build/C/man7/mq_overview.7:339
1575 msgid "Signal number to be used for B<SIGEV_SIGNAL>."
1576 msgstr "B<SIGEV_SIGNAL> に使用されるシグナル番号。"
1577
1578 #. type: SS
1579 #: build/C/man7/mq_overview.7:339
1580 #, no-wrap
1581 msgid "Polling message queue descriptors"
1582 msgstr "メッセージキュー記述子のポーリング"
1583
1584 #. type: Plain text
1585 #: build/C/man7/mq_overview.7:347
1586 msgid "On Linux, a message queue descriptor is actually a file descriptor, and can be monitored using B<select>(2), B<poll>(2), or B<epoll>(7).  This is not portable."
1587 msgstr "Linux では、メッセージキュー記述子は実際はファイルディスクリプター (file descriptor)  であり、 B<select>(2), B<poll>(2), B<epoll>(7)  を使って監視することができる。 この機能の移植性はない。"
1588
1589 #. type: SS
1590 #: build/C/man7/mq_overview.7:347
1591 #, no-wrap
1592 msgid "IPC namespaces"
1593 msgstr "IPC 名前空間"
1594
1595 #. type: Plain text
1596 #: build/C/man7/mq_overview.7:351
1597 msgid "For a discussion of the interaction of System V IPC objects and IPC namespaces, see B<namespaces>(7)."
1598 msgstr "System V IPC オブジェクトと IPC 名前空間の相互の影響に関する議論は B<namespaces>(7) を参照。"
1599
1600 #. type: Plain text
1601 #: build/C/man7/mq_overview.7:363
1602 msgid "System V message queues (B<msgget>(2), B<msgsnd>(2), B<msgrcv>(2), etc.) are an older API for exchanging messages between processes.  POSIX message queues provide a better designed interface than System V message queues; on the other hand POSIX message queues are less widely available (especially on older systems) than System V message queues."
1603 msgstr "System V メッセージキュー (B<msgget>(2), B<msgsnd>(2), B<msgrcv>(2)  など) はプロセス間でメッセージをやり取りするための古い API である。 POSIX メッセージキューは System V メッセージキューよりもうまく 設計されたインターフェースを提供している。 一方で、POSIX メッセージキューは System V メッセージキューと比べると 利用できるシステムが少ない (特に、古いシステムでは少ない)。"
1604
1605 #. type: Plain text
1606 #: build/C/man7/mq_overview.7:366
1607 msgid "Linux does not currently (2.6.26) support the use of access control lists (ACLs) for POSIX message queues."
1608 msgstr "現在のことろ (バージョン 2.6.26 時点)、 Linux は POSIX メッセージキューに対するアクセス制御リスト (ACL) に 対応していない。"
1609
1610 #. type: Plain text
1611 #: build/C/man7/mq_overview.7:369
1612 msgid "An example of the use of various message queue functions is shown in B<mq_notify>(3)."
1613 msgstr "各種のメッセージキュー関数を使用した例が B<mq_notify>(3)  に記載されている。"
1614
1615 #. type: Plain text
1616 #: build/C/man7/mq_overview.7:378
1617 msgid "In Linux versions 3.5 to 3.14, the kernel imposed a ceiling of 1024 (B<HARD_QUEUESMAX>)  on the value to which the I<queues_max> limit could be raised, and the ceiling was enforced even for privileged processes.  This ceiling value was removed in Linux 3.14, and patches to stable kernels 3.5.x to 3.13.x also removed the ceiling."
1618 msgstr "バージョン 3.5 以降 3.14 未満の Linux では、 I<queues_max> 上限を増やすことができる最大値として 1024 (B<HARD_QUEUESMAX>) という最大上限値がカーネルにより適用されていた。 この最大上限値は特権プロセスにも適用されていた。 この最大上限値は Linux 3.14 で削除され、 パッチで安定版カーネル 3.5.x から 3.13.x からもこの最大上限値は削除された。"
1619
1620 #. type: Plain text
1621 #: build/C/man7/mq_overview.7:392
1622 msgid "B<getrlimit>(2), B<mq_getsetattr>(2), B<poll>(2), B<select>(2), B<mq_close>(3), B<mq_getattr>(3), B<mq_notify>(3), B<mq_open>(3), B<mq_receive>(3), B<mq_send>(3), B<mq_unlink>(3), B<epoll>(7), B<namespaces>(7)"
1623 msgstr "B<getrlimit>(2), B<mq_getsetattr>(2), B<poll>(2), B<select>(2), B<mq_close>(3), B<mq_getattr>(3), B<mq_notify>(3), B<mq_open>(3), B<mq_receive>(3), B<mq_send>(3), B<mq_unlink>(3), B<epoll>(7), B<namespaces>(7)"
1624
1625 #. type: TH
1626 #: build/C/man3/mq_receive.3:26
1627 #, no-wrap
1628 msgid "MQ_RECEIVE"
1629 msgstr "MQ_RECEIVE"
1630
1631 #. type: TH
1632 #: build/C/man3/mq_receive.3:26 build/C/man3/mq_send.3:26
1633 #, no-wrap
1634 msgid "2014-06-03"
1635 msgstr "2014-06-03"
1636
1637 #. type: Plain text
1638 #: build/C/man3/mq_receive.3:29
1639 msgid "mq_receive, mq_timedreceive - receive a message from a message queue"
1640 msgstr "mq_receive, mq_timedreceive - メッセージキューからメッセージを受信する"
1641
1642 #. type: Plain text
1643 #: build/C/man3/mq_receive.3:35
1644 #, no-wrap
1645 msgid ""
1646 "B<ssize_t mq_receive(mqd_t >I<mqdes>B<, char *>I<msg_ptr>B<,>\n"
1647 "B<                   size_t >I<msg_len>B<, unsigned int *>I<msg_prio>B<);>\n"
1648 msgstr ""
1649 "B<ssize_t mq_receive(mqd_t >I<mqdes>B<, char *>I<msg_ptr>B<,>\n"
1650 "B<                   size_t >I<msg_len>B<, unsigned int *>I<msg_prio>B<);>\n"
1651
1652 #. type: Plain text
1653 #: build/C/man3/mq_receive.3:38 build/C/man3/mq_send.3:38
1654 #, no-wrap
1655 msgid ""
1656 "B<#include E<lt>time.hE<gt>>\n"
1657 "B<#include E<lt>mqueue.hE<gt>>\n"
1658 msgstr ""
1659 "B<#include E<lt>time.hE<gt>>\n"
1660 "B<#include E<lt>mqueue.hE<gt>>\n"
1661
1662 #. type: Plain text
1663 #: build/C/man3/mq_receive.3:42
1664 #, no-wrap
1665 msgid ""
1666 "B<ssize_t mq_timedreceive(mqd_t >I<mqdes>B<, char *>I<msg_ptr>B<,>\n"
1667 "B<                   size_t >I<msg_len>B<, unsigned int *>I<msg_prio>B<,>\n"
1668 "B<                   const struct timespec *>I<abs_timeout>B<);>\n"
1669 msgstr ""
1670 "B<ssize_t mq_timedreceive(mqd_t >I<mqdes>B<, char *>I<msg_ptr>B<,>\n"
1671 "B<                   size_t >I<msg_len>B<, unsigned int *>I<msg_prio>B<,>\n"
1672 "B<                   const struct timespec *>I<abs_timeout>B<);>\n"
1673
1674 #. type: Plain text
1675 #: build/C/man3/mq_receive.3:50 build/C/man3/mq_send.3:50
1676 msgid "Feature Test Macro Requirements for glibc (see B<feature_test_macros>(7)):"
1677 msgstr "glibc 向けの機能検査マクロの要件 (B<feature_test_macros>(7)  参照):"
1678
1679 #. type: Plain text
1680 #: build/C/man3/mq_receive.3:53
1681 msgid "B<mq_timedreceive>():"
1682 msgstr "B<mq_timedreceive>():"
1683
1684 #. type: Plain text
1685 #: build/C/man3/mq_receive.3:55 build/C/man3/mq_send.3:55
1686 msgid "_XOPEN_SOURCE\\ E<gt>=\\ 600 || _POSIX_C_SOURCE\\ E<gt>=\\ 200112L"
1687 msgstr "_XOPEN_SOURCE\\ E<gt>=\\ 600 || _POSIX_C_SOURCE\\ E<gt>=\\ 200112L"
1688
1689 #. type: Plain text
1690 #: build/C/man3/mq_receive.3:76
1691 msgid "B<mq_receive>()  removes the oldest message with the highest priority from the message queue referred to by the descriptor I<mqdes>, and places it in the buffer pointed to by I<msg_ptr>.  The I<msg_len> argument specifies the size of the buffer pointed to by I<msg_ptr>; this must be greater than or equal to the I<mq_msgsize> attribute of the queue (see B<mq_getattr>(3)).  If I<msg_prio> is not NULL, then the buffer to which it points is used to return the priority associated with the received message."
1692 msgstr "B<mq_receive>()  は、記述子 I<mqdes> で参照されるメッセージキューから最も高い優先度を持つ 最も古いメッセージを削除し、そのメッセージを I<msg_ptr> が指すバッファーに格納する。 I<msg_len> 引き数は、 I<msg_ptr> が指すバッファーの大きさを示す。この値はキューの I<mq_msgsize> 属性以上でなければならない (B<mq_getattr>(3)  参照)。 I<msg_prio> が NULL 以外の場合、 I<msg_prio> が指すバッファーに受信したメッセージの優先度が格納される。"
1693
1694 #. type: Plain text
1695 #: build/C/man3/mq_receive.3:86
1696 msgid "If the queue is empty, then, by default, B<mq_receive>()  blocks until a message becomes available, or the call is interrupted by a signal handler.  If the B<O_NONBLOCK> flag is enabled for the message queue description, then the call instead fails immediately with the error B<EAGAIN>."
1697 msgstr "キューが空の場合、デフォルトでは、 B<mq_receive>()  は、新しいメッセージが届くか、関数呼び出しがシグナルハンドラーにより 中断されるまで、停止 (block) する。 メッセージキュー記述 (message queue description) で B<O_NONBLOCK> フラグが有効になっている場合は、 B<mq_receive>()  はエラー B<EAGAIN> ですぐに失敗する。"
1698
1699 #. type: Plain text
1700 #: build/C/man3/mq_receive.3:99
1701 msgid "B<mq_timedreceive>()  behaves just like B<mq_receive>(), except that if the queue is empty and the B<O_NONBLOCK> flag is not enabled for the message queue description, then I<abs_timeout> points to a structure which specifies a ceiling on the time for which the call will block.  This ceiling is an absolute timeout in seconds and nanoseconds since the Epoch, 1970-01-01 00:00:00 +0000 (UTC), and it is specified in the following structure:"
1702 msgstr "B<mq_timedreceive>()  は B<mq_receive>()  と全く同じ動作をするが、 メッセージキューが空で、メッセージキュー記述で B<O_NONBLOCK> フラグが有効になっていない場合に、この呼び出しが停止する時間の上限を I<abs_timeout> が指す構造体で指定する点が異なる。この上限は、タイムアウトの時刻を、 時刻紀元 (Epoch; 1970-01-01 00:00:00 +0000 (UTC)) からの経過時間 (秒とナノ秒の組) で指定する。タイムアウト時刻は以下の構造体で指定する:"
1703
1704 #. type: Plain text
1705 #: build/C/man3/mq_receive.3:106 build/C/man3/mq_send.3:112
1706 #, no-wrap
1707 msgid ""
1708 "struct timespec {\n"
1709 "    time_t tv_sec;        /* seconds */\n"
1710 "    long   tv_nsec;       /* nanoseconds */\n"
1711 "};\n"
1712 msgstr ""
1713 "struct timespec {\n"
1714 "    time_t tv_sec;        /* 秒 */\n"
1715 "    long   tv_nsec;       /* ナノ秒 */\n"
1716 "};\n"
1717
1718 #. type: Plain text
1719 #: build/C/man3/mq_receive.3:113
1720 msgid "If no message is available, and the timeout has already expired by the time of the call, B<mq_timedreceive>()  returns immediately."
1721 msgstr "メッセージがキューになく、関数呼び出し時にすでにタイムアウト時刻が 過ぎている場合、 B<mq_timedreceive>()  はすぐに返る。"
1722
1723 #. type: Plain text
1724 #: build/C/man3/mq_receive.3:122
1725 msgid "On success, B<mq_receive>()  and B<mq_timedreceive>()  return the number of bytes in the received message; on error, -1 is returned, with I<errno> set to indicate the error."
1726 msgstr "成功すると、 B<mq_receive>()  と B<mq_timedreceive>()  は受信したメッセージのバイト数を返す。 エラーの場合、-1 を返し、 I<errno> にエラーを示す値を設定する。"
1727
1728 #. type: TP
1729 #: build/C/man3/mq_receive.3:123 build/C/man3/mq_send.3:128
1730 #: build/C/man2/msgop.2:364 build/C/man2/msgop.2:419
1731 #, no-wrap
1732 msgid "B<EAGAIN>"
1733 msgstr "B<EAGAIN>"
1734
1735 #. type: Plain text
1736 #: build/C/man3/mq_receive.3:129
1737 msgid "The queue was empty, and the B<O_NONBLOCK> flag was set for the message queue description referred to by I<mqdes>."
1738 msgstr "キューが空で、かつ I<mqdes> で参照されるメッセージキュー記述で B<O_NONBLOCK> フラグがセットされていた。"
1739
1740 #. type: Plain text
1741 #: build/C/man3/mq_receive.3:134 build/C/man3/mq_send.3:139
1742 msgid "The descriptor specified in I<mqdes> was invalid."
1743 msgstr "I<mqdes> で指定された記述子が不正である。"
1744
1745 #. type: TP
1746 #: build/C/man3/mq_receive.3:134 build/C/man3/mq_send.3:139
1747 #: build/C/man2/msgop.2:380 build/C/man2/msgop.2:434
1748 #, no-wrap
1749 msgid "B<EINTR>"
1750 msgstr "B<EINTR>"
1751
1752 #. type: Plain text
1753 #: build/C/man3/mq_receive.3:138 build/C/man3/mq_send.3:143
1754 msgid "The call was interrupted by a signal handler; see B<signal>(7)."
1755 msgstr "関数呼び出しがシグナルハンドラーにより中断された。 B<signal>(7)  参照。"
1756
1757 #. type: Plain text
1758 #: build/C/man3/mq_receive.3:147 build/C/man3/mq_send.3:152
1759 msgid "The call would have blocked, and I<abs_timeout> was invalid, either because I<tv_sec> was less than zero, or because I<tv_nsec> was less than zero or greater than 1000 million."
1760 msgstr "関数呼び出しは停止するはずであったが、 I<abs_timeout> が不正であった。 I<abs_timeout> が不正とは、 I<tv_sec> が 0 未満、もしくは I<tv_nsec> が 0 未満か 1,000,000,000 より大きい、ということである。"
1761
1762 #. type: TP
1763 #: build/C/man3/mq_receive.3:147 build/C/man3/mq_send.3:152
1764 #, no-wrap
1765 msgid "B<EMSGSIZE>"
1766 msgstr "B<EMSGSIZE>"
1767
1768 #. type: Plain text
1769 #: build/C/man3/mq_receive.3:153
1770 msgid "I<msg_len> was less than the I<mq_msgsize> attribute of the message queue."
1771 msgstr "I<msg_len> がメッセージキューの I<mq_msgsize> 属性よりも小さかった。"
1772
1773 #. type: TP
1774 #: build/C/man3/mq_receive.3:153 build/C/man3/mq_send.3:158
1775 #, no-wrap
1776 msgid "B<ETIMEDOUT>"
1777 msgstr "B<ETIMEDOUT>"
1778
1779 #. type: Plain text
1780 #: build/C/man3/mq_receive.3:156 build/C/man3/mq_send.3:161
1781 msgid "The call timed out before a message could be transferred."
1782 msgstr "メッセージが転送される前に関数呼び出しがタイムアウトした。"
1783
1784 #. type: Plain text
1785 #: build/C/man3/mq_receive.3:163
1786 msgid "The B<mq_receive>()  and B<mq_timedreceive>()  functions are thread-safe."
1787 msgstr "関数 B<mq_receive>() と B<mq_timedreceive>() はスレッドセーフである。"
1788
1789 #. type: Plain text
1790 #: build/C/man3/mq_receive.3:171
1791 msgid "On Linux, B<mq_timedreceive>()  is a system call, and B<mq_receive>()  is a library function layered on top of that system call."
1792 msgstr "Linux では、 B<mq_timedreceive>()  はシステムコールである。 B<mq_receive>()  はライブラリ関数で、 B<mq_timedreceive>()  システムコールを用いて実装されている。"
1793
1794 #. type: Plain text
1795 #: build/C/man3/mq_receive.3:180
1796 msgid "B<mq_close>(3), B<mq_getattr>(3), B<mq_notify>(3), B<mq_open>(3), B<mq_send>(3), B<mq_unlink>(3), B<mq_overview>(7), B<time>(7)"
1797 msgstr "B<mq_close>(3), B<mq_getattr>(3), B<mq_notify>(3), B<mq_open>(3), B<mq_send>(3), B<mq_unlink>(3), B<mq_overview>(7), B<time>(7)"
1798
1799 #. type: TH
1800 #: build/C/man3/mq_send.3:26
1801 #, no-wrap
1802 msgid "MQ_SEND"
1803 msgstr "MQ_SEND"
1804
1805 #. type: Plain text
1806 #: build/C/man3/mq_send.3:29
1807 msgid "mq_send, mq_timedsend - send a message to a message queue"
1808 msgstr "mq_send, mq_timedsend - メッセージキューにメッセージを送信する"
1809
1810 #. type: Plain text
1811 #: build/C/man3/mq_send.3:35
1812 #, no-wrap
1813 msgid ""
1814 "B<int mq_send(mqd_t >I<mqdes>B<, const char *>I<msg_ptr>B<,>\n"
1815 "B<              size_t >I<msg_len>B<, unsigned int >I<msg_prio>B<);>\n"
1816 msgstr ""
1817 "B<int mq_send(mqd_t >I<mqdes>B<, const char *>I<msg_ptr>B<,>\n"
1818 "B<              size_t >I<msg_len>B<, unsigned int >I<msg_prio>B<);>\n"
1819
1820 #. type: Plain text
1821 #: build/C/man3/mq_send.3:42
1822 #, no-wrap
1823 msgid ""
1824 "B<int mq_timedsend(mqd_t >I<mqdes>B<, const char *>I<msg_ptr>B<,>\n"
1825 "B<              size_t >I<msg_len>B<, unsigned int >I<msg_prio>B<,>\n"
1826 "B<              const struct timespec *>I<abs_timeout>B<);>\n"
1827 msgstr ""
1828 "B<int mq_timedsend(mqd_t >I<mqdes>B<, const char *>I<msg_ptr>B<,>\n"
1829 "B<              size_t >I<msg_len>B<, unsigned int >I<msg_prio>B<,>\n"
1830 "B<              const struct timespec *>I<abs_timeout>B<);>\n"
1831
1832 #. type: Plain text
1833 #: build/C/man3/mq_send.3:53
1834 msgid "B<mq_timedsend>():"
1835 msgstr "B<mq_timedsend>():"
1836
1837 #. type: Plain text
1838 #: build/C/man3/mq_send.3:71
1839 msgid "B<mq_send>()  adds the message pointed to by I<msg_ptr> to the message queue referred to by the descriptor I<mqdes>.  The I<msg_len> argument specifies the length of the message pointed to by I<msg_ptr>; this length must be less than or equal to the queue's I<mq_msgsize> attribute.  Zero-length messages are allowed."
1840 msgstr "B<mq_send>()  は、記述子 I<mqdes> で参照されるメッセージキューに I<msg_ptr> が指すメッセージを追加する。 I<msg_len> 引き数は、 I<msg_ptr> が指すメッセージの長さを示す。この長さはキューの I<mq_msgsize> 属性以下でなければならない。 長さが 0 のメッセージも認められている。"
1841
1842 #. type: Plain text
1843 #: build/C/man3/mq_send.3:79
1844 msgid "The I<msg_prio> argument is a nonnegative integer that specifies the priority of this message.  Messages are placed on the queue in decreasing order of priority, with newer messages of the same priority being placed after older messages with the same priority."
1845 msgstr "I<msg_prio> 引き数は、メッセージの優先度を指定する負でない整数である。 メッセージは優先度の降順でキューに格納され、同じ優先度の新しいメッセージは 同じ優先度の古いメッセージの後ろに格納される。"
1846
1847 #. type: Plain text
1848 #: build/C/man3/mq_send.3:92
1849 msgid "If the message queue is already full (i.e., the number of messages on the queue equals the queue's I<mq_maxmsg> attribute), then, by default, B<mq_send>()  blocks until sufficient space becomes available to allow the message to be queued, or until the call is interrupted by a signal handler.  If the B<O_NONBLOCK> flag is enabled for the message queue description, then the call instead fails immediately with the error B<EAGAIN>."
1850 msgstr "メッセージキューがすでに一杯の場合 (すなわち、キューに入っているメッセージ数がキューの I<mq_maxmsg> 属性と等しい場合)、デフォルトでは、 B<mq_send ()> は、メッセージをキューイングするのに十分な空間ができるか、 関数呼び出しがシグナルハンドラーにより中断されるまで、停止 (block) する。 メッセージキュー記述 (message queue description) で B<O_NONBLOCK> フラグが有効になっている場合は、 B<mq_send>()  はエラー B<EAGAIN> ですぐに失敗する。"
1851
1852 #. type: Plain text
1853 #: build/C/man3/mq_send.3:105
1854 msgid "B<mq_timedsend>()  behaves just like B<mq_send>(), except that if the queue is full and the B<O_NONBLOCK> flag is not enabled for the message queue description, then I<abs_timeout> points to a structure which specifies a ceiling on the time for which the call will block.  This ceiling is an absolute timeout in seconds and nanoseconds since the Epoch, 1970-01-01 00:00:00 +0000 (UTC), and it is specified in the following structure:"
1855 msgstr "B<mq_timedsend>()  は B<mq_send>()  と全く同じ動作をするが、 メッセージキューが一杯で、メッセージキュー記述で B<O_NONBLOCK> フラグが有効になっていない場合に、この呼び出しが停止する時間の上限を I<abs_timeout> が指す構造体で指定する点が異なる。この上限は、タイムアウトの時刻を 時刻紀元 (Epoch; 1970-01-01 00:00:00 +0000 (UTC)) からの経過時間 (秒とナノ秒の組) で指定する。タイムアウト時刻は以下の構造体で指定する:"
1856
1857 #. type: Plain text
1858 #: build/C/man3/mq_send.3:119
1859 msgid "If the message queue is full, and the timeout has already expired by the time of the call, B<mq_timedsend>()  returns immediately."
1860 msgstr "メッセージキューが一杯で、関数呼び出し時にすでにタイムアウト時刻が 過ぎている場合、 B<mq_timedsend>()  はすぐに返る。"
1861
1862 #. type: Plain text
1863 #: build/C/man3/mq_send.3:127
1864 msgid "On success, B<mq_send>()  and B<mq_timedsend>()  return zero; on error, -1 is returned, with I<errno> set to indicate the error."
1865 msgstr "成功すると、 B<mq_send>()  と B<mq_timedsend>()  は 0 を返す。 エラーの場合、-1 を返し、 I<errno> にエラーを示す値を設定する。"
1866
1867 #. type: Plain text
1868 #: build/C/man3/mq_send.3:134
1869 msgid "The queue was full, and the B<O_NONBLOCK> flag was set for the message queue description referred to by I<mqdes>."
1870 msgstr "キューが一杯で、かつ I<mqdes> で参照されるメッセージキュー記述で B<O_NONBLOCK> フラグがセットされていた。"
1871
1872 #. type: Plain text
1873 #: build/C/man3/mq_send.3:158
1874 msgid "I<msg_len> was greater than the I<mq_msgsize> attribute of the message queue."
1875 msgstr "I<msg_len> がメッセージキューの I<mq_msgsize> 属性よりも大きかった。"
1876
1877 #. type: Plain text
1878 #: build/C/man3/mq_send.3:168
1879 msgid "The B<mq_send>()  and B<mq_timedsend>()  functions are thread-safe."
1880 msgstr "関数 B<mq_send>() と B<mq_timedsend>() はスレッドセーフである。"
1881
1882 #. type: Plain text
1883 #: build/C/man3/mq_send.3:176
1884 msgid "On Linux, B<mq_timedsend>()  is a system call, and B<mq_send>()  is a library function layered on top of that system call."
1885 msgstr "Linux では、 B<mq_timedsend>()  はシステムコールである。 B<mq_send>()  はライブラリ関数で、 B<mq_timedsend>()  システムコールを用いて実装されている。"
1886
1887 #. type: Plain text
1888 #: build/C/man3/mq_send.3:185
1889 msgid "B<mq_close>(3), B<mq_getattr>(3), B<mq_notify>(3), B<mq_open>(3), B<mq_receive>(3), B<mq_unlink>(3), B<mq_overview>(7), B<time>(7)"
1890 msgstr "B<mq_close>(3), B<mq_getattr>(3), B<mq_notify>(3), B<mq_open>(3), B<mq_receive>(3), B<mq_unlink>(3), B<mq_overview>(7), B<time>(7)"
1891
1892 #. type: TH
1893 #: build/C/man3/mq_unlink.3:26
1894 #, no-wrap
1895 msgid "MQ_UNLINK"
1896 msgstr "MQ_UNLINK"
1897
1898 #. type: Plain text
1899 #: build/C/man3/mq_unlink.3:29
1900 msgid "mq_unlink - remove a message queue"
1901 msgstr "mq_unlink - メッセージキューを削除する"
1902
1903 #. type: Plain text
1904 #: build/C/man3/mq_unlink.3:34
1905 #, no-wrap
1906 msgid "B<int mq_unlink(const char *>I<name>B<);>\n"
1907 msgstr "B<int mq_unlink(const char *>I<name>B<);>\n"
1908
1909 #. type: Plain text
1910 #: build/C/man3/mq_unlink.3:44
1911 msgid "B<mq_unlink>()  removes the specified message queue I<name>.  The message queue name is removed immediately.  The queue itself is destroyed once any other processes that have the queue open close their descriptors referring to the queue."
1912 msgstr "B<mq_unlink>()  は指定されたメッセージキュー I<name> を削除する。 メッセージキュー名は直ちに削除される。 キュー自体は、そのキューをオープンした他のすべてのプロセスが そのキューを参照する記述子をクローズした時点で破棄される。"
1913
1914 #. type: Plain text
1915 #: build/C/man3/mq_unlink.3:50
1916 msgid "On success B<mq_unlink>()  returns 0; on error, -1 is returned, with I<errno> set to indicate the error."
1917 msgstr "成功すると、 B<mq_unlink>()  は 0 を返す。エラーの場合、-1 を返し、 I<errno> にエラーを示す値を設定する。"
1918
1919 #. type: Plain text
1920 #: build/C/man3/mq_unlink.3:54
1921 msgid "The caller does not have permission to unlink this message queue."
1922 msgstr "呼び出し元プロセスがこのメッセージキューを削除 (unlink) する 許可を持たない。"
1923
1924 #. type: Plain text
1925 #: build/C/man3/mq_unlink.3:62
1926 msgid "There is no message queue with the given I<name>."
1927 msgstr "指定された名前 I<name> を持つメッセージキューが存在しない。"
1928
1929 #. type: Plain text
1930 #: build/C/man3/mq_unlink.3:67
1931 msgid "The B<mq_unlink>()  function is thread-safe."
1932 msgstr "関数 B<mq_unlink>() はスレッドセーフである。"
1933
1934 #. type: Plain text
1935 #: build/C/man3/mq_unlink.3:77
1936 msgid "B<mq_close>(3), B<mq_getattr>(3), B<mq_notify>(3), B<mq_open>(3), B<mq_receive>(3), B<mq_send>(3), B<mq_overview>(7)"
1937 msgstr "B<mq_close>(3), B<mq_getattr>(3), B<mq_notify>(3), B<mq_open>(3), B<mq_receive>(3), B<mq_send>(3), B<mq_overview>(7)"
1938
1939 #. type: TH
1940 #: build/C/man2/msgctl.2:37
1941 #, no-wrap
1942 msgid "MSGCTL"
1943 msgstr "MSGCTL"
1944
1945 #. type: TH
1946 #: build/C/man2/msgctl.2:37
1947 #, no-wrap
1948 msgid "2014-02-24"
1949 msgstr "2014-02-24"
1950
1951 #. type: Plain text
1952 #: build/C/man2/msgctl.2:40
1953 msgid "msgctl - System V message control operations"
1954 msgstr "msgctl - System V メッセージ制御操作"
1955
1956 #. type: Plain text
1957 #: build/C/man2/msgctl.2:45 build/C/man2/msgget.2:43 build/C/man2/msgop.2:49
1958 #, no-wrap
1959 msgid ""
1960 "B<#include E<lt>sys/types.hE<gt>>\n"
1961 "B<#include E<lt>sys/ipc.hE<gt>>\n"
1962 "B<#include E<lt>sys/msg.hE<gt>>\n"
1963 msgstr ""
1964 "B<#include E<lt>sys/types.hE<gt>>\n"
1965 "B<#include E<lt>sys/ipc.hE<gt>>\n"
1966 "B<#include E<lt>sys/msg.hE<gt>>\n"
1967
1968 #. type: Plain text
1969 #: build/C/man2/msgctl.2:47
1970 #, no-wrap
1971 msgid "B<int msgctl(int >I<msqid>B<, int >I<cmd>B<, struct msqid_ds *>I<buf>B<);>\n"
1972 msgstr "B<int msgctl(int >I<msqid>B<, int >I<cmd>B<, struct msqid_ds *>I<buf>B<);>\n"
1973
1974 #. type: Plain text
1975 #: build/C/man2/msgctl.2:54
1976 msgid "B<msgctl>()  performs the control operation specified by I<cmd> on the System\\ V message queue with identifier I<msqid>."
1977 msgstr "B<msgctl>()  はメッセージキュー識別子 I<msqid> で指定された System\\ V メッセージキュー (message queue) に対して I<cmd> で指定された制御操作を行なう。"
1978
1979 #. type: Plain text
1980 #: build/C/man2/msgctl.2:58
1981 msgid "The I<msqid_ds> data structure is defined in I<E<lt>sys/msg.hE<gt>> as follows:"
1982 msgstr "I<msqid_ds> データ構造体は I<E<lt>sys/msg.hE<gt>> で以下のように定義されている:"
1983
1984 #. type: Plain text
1985 #: build/C/man2/msgctl.2:75
1986 #, no-wrap
1987 msgid ""
1988 "struct msqid_ds {\n"
1989 "    struct ipc_perm msg_perm;     /* Ownership and permissions */\n"
1990 "    time_t          msg_stime;    /* Time of last msgsnd(2) */\n"
1991 "    time_t          msg_rtime;    /* Time of last msgrcv(2) */\n"
1992 "    time_t          msg_ctime;    /* Time of last change */\n"
1993 "    unsigned long   __msg_cbytes; /* Current number of bytes in\n"
1994 "                                     queue (nonstandard) */\n"
1995 "    msgqnum_t       msg_qnum;     /* Current number of messages\n"
1996 "                                     in queue */\n"
1997 "    msglen_t        msg_qbytes;   /* Maximum number of bytes\n"
1998 "                                     allowed in queue */\n"
1999 "    pid_t           msg_lspid;    /* PID of last msgsnd(2) */\n"
2000 "    pid_t           msg_lrpid;    /* PID of last msgrcv(2) */\n"
2001 "};\n"
2002 msgstr ""
2003 "struct msqid_ds {\n"
2004 "    struct ipc_perm msg_perm;     /* 所有権と許可 */\n"
2005 "    time_t          msg_stime;    /* 最後の msgsnd(2) の時刻 */\n"
2006 "    time_t          msg_rtime;    /* 最後の msgrcv(2) の時刻 */\n"
2007 "    time_t          msg_ctime;    /* 最後に変更が行われた時刻 */\n"
2008 "    unsigned long   __msg_cbytes; /* キューにある現在のバイト数\n"
2009 "                                     (非標準) */\n"
2010 "    msgqnum_t       msg_qnum;     /* キューにある現在入っている\n"
2011 "                                     メッセージの数 */\n"
2012 "    msglen_t        msg_qbytes;   /* キューに許可されている\n"
2013 "                                     最大バイト数 */\n"
2014 "    pid_t           msg_lspid;    /* 最後の msgsnd(2) の PID */\n"
2015 "    pid_t           msg_lrpid;    /* 最後の msgrcv(2) の PID */\n"
2016 "};\n"
2017
2018 #. type: Plain text
2019 #: build/C/man2/msgctl.2:83
2020 msgid "The I<ipc_perm> structure is defined as follows (the highlighted fields are settable using B<IPC_SET>):"
2021 msgstr "I<ipc_perm> 構造体は以下のように定義されている (強調されたフィールドは B<IPC_SET> を使って設定可能である):"
2022
2023 #. type: Plain text
2024 #: build/C/man2/msgctl.2:95
2025 #, no-wrap
2026 msgid ""
2027 "struct ipc_perm {\n"
2028 "    key_t          __key;       /* Key supplied to msgget(2) */\n"
2029 "    uid_t          B<uid>;         /* Effective UID of owner */\n"
2030 "    gid_t          B<gid>;         /* Effective GID of owner */\n"
2031 "    uid_t          cuid;        /* Effective UID of creator */\n"
2032 "    gid_t          cgid;        /* Effective GID of creator */\n"
2033 "    unsigned short B<mode>;        /* Permissions */\n"
2034 "    unsigned short __seq;       /* Sequence number */\n"
2035 "};\n"
2036 msgstr ""
2037 "struct ipc_perm {\n"
2038 "    key_t          __key;       /* msgget(2) に与えるキー */\n"
2039 "    uid_t          B<uid>;         /* 所有者の実効 UID */\n"
2040 "    gid_t          B<gid>;         /* 所有者の実効 GID */\n"
2041 "    uid_t          cuid;        /* 作成者の実効 UID */\n"
2042 "    gid_t          cgid;        /* 作成者の実効 GID */\n"
2043 "    unsigned short B<mode>;        /* 許可 */\n"
2044 "    unsigned short __seq;       /* シーケンス番号 */\n"
2045 "};\n"
2046
2047 #. type: Plain text
2048 #: build/C/man2/msgctl.2:101
2049 msgid "Valid values for I<cmd> are:"
2050 msgstr "I<cmd> として有効な値は:"
2051
2052 #. type: TP
2053 #: build/C/man2/msgctl.2:101
2054 #, no-wrap
2055 msgid "B<IPC_STAT>"
2056 msgstr "B<IPC_STAT>"
2057
2058 #. type: Plain text
2059 #: build/C/man2/msgctl.2:110
2060 msgid "Copy information from the kernel data structure associated with I<msqid> into the I<msqid_ds> structure pointed to by I<buf>.  The caller must have read permission on the message queue."
2061 msgstr "I<msqid> に関連づけられたメッセージキューデータ構造体から、ポインター I<buf> が指し示す I<msqid_ds> 構造体に情報をコピーする。 呼び出し側はメッセージキューに対する読み込み許可を持っていなければならない。"
2062
2063 #. type: TP
2064 #: build/C/man2/msgctl.2:110
2065 #, no-wrap
2066 msgid "B<IPC_SET>"
2067 msgstr "B<IPC_SET>"
2068
2069 #. type: Plain text
2070 #: build/C/man2/msgctl.2:137
2071 msgid "Write the values of some members of the I<msqid_ds> structure pointed to by I<buf> to the kernel data structure associated with this message queue, updating also its I<msg_ctime> member.  The following members of the structure are updated: I<msg_qbytes>, I<msg_perm.uid>, I<msg_perm.gid>, and (the least significant 9 bits of)  I<msg_perm.mode>.  The effective UID of the calling process must match the owner (I<msg_perm.uid>)  or creator (I<msg_perm.cuid>)  of the message queue, or the caller must be privileged.  Appropriate privilege (Linux: the B<CAP_SYS_RESOURCE> capability) is required to raise the I<msg_qbytes> value beyond the system parameter B<MSGMNB>."
2072 msgstr "ポインター I<buf> が指し示す I<msqid_ds> 構造体のメンバーの値を、メッセージキューに関連づけられた カーネルデータ構造体に書き込み、 I<msg_ctime> メンバーも更新する。 構造体のメンバーのうち、更新されるものを以下に示す: I<msg_qbytes>, I<msg_perm.uid>, I<msg_perm.gid>, I<msg_perm.mode> (の下位 9 ビット)。 呼び出したプロセスの実効ユーザー ID が、メッセージキューの所有者 (I<msg_perm.uid>)  または作成者 (I<msg_perm.cuid>)  と一致するか、呼び出し元が特権を持たなければならない。 I<msg_qbytes> をシステムパラメーターの B<MSGMNB> を超えて設定するには、適切な特権 (Linux では B<CAP_SYS_RESOURCE> ケーパビリティ (capability)) が必要である。"
2073
2074 #. type: TP
2075 #: build/C/man2/msgctl.2:137
2076 #, no-wrap
2077 msgid "B<IPC_RMID>"
2078 msgstr "B<IPC_RMID>"
2079
2080 #. type: Plain text
2081 #: build/C/man2/msgctl.2:151
2082 msgid "Immediately remove the message queue, awakening all waiting reader and writer processes (with an error return and I<errno> set to B<EIDRM>).  The calling process must have appropriate privileges or its effective user ID must be either that of the creator or owner of the message queue.  The third argument to B<msgctl>()  is ignored in this case."
2083 msgstr "メッセージキューをただちに削除する。 同時にその構造体の読み書きの待ち状態にあったプロセスに通知する (エラーが返り、 I<errno> が B<EIDRM> に設定される)。 呼び出したプロセスが適切な特権を持っているか、 呼び出したプロセスの実効ユーザー ID がメッセージキューの作成者か 所有者の実効ユーザー ID でなければならない。この場合、 B<msgctl>() の第 3 引き数は無視される。"
2084
2085 #. type: TP
2086 #: build/C/man2/msgctl.2:151
2087 #, no-wrap
2088 msgid "B<IPC_INFO> (Linux-specific)"
2089 msgstr "B<IPC_INFO> (Linux 固有)"
2090
2091 #. type: Plain text
2092 #: build/C/man2/msgctl.2:164
2093 msgid "Return information about system-wide message queue limits and parameters in the structure pointed to by I<buf>.  This structure is of type I<msginfo> (thus, a cast is required), defined in I<E<lt>sys/msg.hE<gt>> if the B<_GNU_SOURCE> feature test macro is defined:"
2094 msgstr "システム全体でのメッセージキューの制限とパラメーターに関する情報を、 I<buf> が指す構造体に入れて返す。 この構造体は I<msginfo> 型である (そのためキャストが必要である)。 I<msginfo> は B<_GNU_SOURCE> 機能検査マクロが定義された場合に I<E<lt>sys/msg.hE<gt>> で以下のように定義される:"
2095
2096 #. type: Plain text
2097 #: build/C/man2/msgctl.2:188
2098 #, no-wrap
2099 msgid ""
2100 "struct msginfo {\n"
2101 "    int msgpool; /* Size in kibibytes of buffer pool\n"
2102 "                    used to hold message data;\n"
2103 "                    unused within kernel */\n"
2104 "    int msgmap;  /* Maximum number of entries in message\n"
2105 "                    map; unused within kernel */\n"
2106 "    int msgmax;  /* Maximum number of bytes that can be\n"
2107 "                    written in a single message */\n"
2108 "    int msgmnb;  /* Maximum number of bytes that can be\n"
2109 "                    written to queue; used to initialize\n"
2110 "                    msg_qbytes during queue creation\n"
2111 "                    (msgget(2)) */\n"
2112 "    int msgmni;  /* Maximum number of message queues */\n"
2113 "    int msgssz;  /* Message segment size;\n"
2114 "                    unused within kernel */\n"
2115 "    int msgtql;  /* Maximum number of messages on all queues\n"
2116 "                    in system; unused within kernel */\n"
2117 "    unsigned short int msgseg;\n"
2118 "                 /* Maximum number of segments;\n"
2119 "                    unused within kernel */\n"
2120 "};\n"
2121 msgstr ""
2122 "struct msginfo {\n"
2123 "    int msgpool; /* メッセージデータの保持に使用される\n"
2124 "                    バッファープールの大きさ (1024 バイト単位);\n"
2125 "                    カーネル内では未使用 */\n"
2126 "    int msgmap;  /* メッセージマップの最大エントリー数;\n"
2127 "                    カーネル内では未使用 */\n"
2128 "    int msgmax;  /* 一つのメッセージに書き込み可能な\n"
2129 "                    最大バイト数 */\n"
2130 "    int msgmnb;  /* 一つのキューに書き込み可能な最大バイト数;\n"
2131 "                    (msgget(2) での) キュー作成中の msg_qbytes\n"
2132 "                    の初期化に使用される */\n"
2133 "    int msgmni;  /* メッセージキューの数の最大値 */\n"
2134 "    int msgssz;  /* メッセージセグメントのサイズ;\n"
2135 "                    カーネル内では未使用 */\n"
2136 "    int msgtql;  /* システム上の全キューの最大メッセージ数;\n"
2137 "                    カーネル内では未使用 */\n"
2138 "    unsigned short int msgseg;\n"
2139 "                 /* 最大セグメント数; カーネル内では未使用 */\n"
2140 "};\n"
2141
2142 #. type: Plain text
2143 #: build/C/man2/msgctl.2:201
2144 msgid "The I<msgmni>, I<msgmax>, and I<msgmnb> settings can be changed via I</proc> files of the same name; see B<proc>(5)  for details."
2145 msgstr "設定 I<msgmni ,> I<msgmax ,> I<msgmnb> は I</proc> にある同じ名前のファイル経由で変更可能である。 詳しくは B<proc>(5)  を参照。"
2146
2147 #. type: TP
2148 #: build/C/man2/msgctl.2:201
2149 #, no-wrap
2150 msgid "B<MSG_INFO> (Linux-specific)"
2151 msgstr "B<MSG_INFO> (Linux 固有)"
2152
2153 #. type: Plain text
2154 #: build/C/man2/msgctl.2:218
2155 msgid "Return a I<msginfo> structure containing the same information as for B<IPC_INFO>, except that the following fields are returned with information about system resources consumed by message queues: the I<msgpool> field returns the number of message queues that currently exist on the system; the I<msgmap> field returns the total number of messages in all queues on the system; and the I<msgtql> field returns the total number of bytes in all messages in all queues on the system."
2156 msgstr "B<IPC_INFO> のときと同じ情報を格納した I<msginfo> 構造体を返す。 但し、以下のフィールドにはメッセージキューが 消費しているシステム資源に関する情報が格納される点が異なる。 I<msgpool> フィールドは現在システム上に存在するメッセージキューの数を返す。 I<msgmap> フィールドはシステム上の全てのキューに入っているメッセージ総数を返す。 I<msgtql> フィールドはシステム上の全てのキューに入っている全メッセージの 総バイト数を返す。"
2157
2158 #. type: TP
2159 #: build/C/man2/msgctl.2:218
2160 #, no-wrap
2161 msgid "B<MSG_STAT> (Linux-specific)"
2162 msgstr "B<MSG_STAT> (Linux 固有)"
2163
2164 #. type: Plain text
2165 #: build/C/man2/msgctl.2:229
2166 msgid "Return a I<msqid_ds> structure as for B<IPC_STAT>.  However, the I<msqid> argument is not a queue identifier, but instead an index into the kernel's internal array that maintains information about all message queues on the system."
2167 msgstr "B<IPC_STAT> と同じく I<msqid_ds> 構造体を返す。 但し、 I<msqid> 引き数は、キュー識別子ではなく、システム上の全てのメッセージキュー に関する情報を管理するカーネルの内部配列へのインデックスである。"
2168
2169 #. type: Plain text
2170 #: build/C/man2/msgctl.2:250
2171 msgid "On success, B<IPC_STAT>, B<IPC_SET>, and B<IPC_RMID> return 0.  A successful B<IPC_INFO> or B<MSG_INFO> operation returns the index of the highest used entry in the kernel's internal array recording information about all message queues.  (This information can be used with repeated B<MSG_STAT> operations to obtain information about all queues on the system.)  A successful B<MSG_STAT> operation returns the identifier of the queue whose index was given in I<msqid>."
2172 msgstr "成功すると、 B<IPC_STAT>, B<IPC_SET>, B<IPC_RMID> は 0 を返す。 B<IPC_INFO> と B<MSG_INFO> 操作は、成功すると、全てのメッセージキューに関する情報を 管理しているカーネルの内部配列の使用中エントリーのインデックスの うち最大値を返す (この情報は、システムの全てのメッセージキューに関する情報を 取得するために、 B<MSG_STAT> 操作を繰り返し実行する際に使用できる)。 B<MSG_STAT> 操作は、成功すると、 I<msqid> で指定されたインデックスを持つメッセージキューの識別子を返す。"
2173
2174 #. type: Plain text
2175 #: build/C/man2/msgctl.2:254
2176 msgid "On error, -1 is returned with I<errno> indicating the error."
2177 msgstr "エラーの場合は -1 を返し、 I<errno> を適切に設定する。"
2178
2179 #. type: Plain text
2180 #: build/C/man2/msgctl.2:258
2181 msgid "On failure, I<errno> is set to one of the following:"
2182 msgstr "失敗した場合、 I<errno> は以下の値の中のどれか一つに設定される:"
2183
2184 #. type: Plain text
2185 #: build/C/man2/msgctl.2:271
2186 msgid "The argument I<cmd> is equal to B<IPC_STAT> or B<MSG_STAT>, but the calling process does not have read permission on the message queue I<msqid>, and does not have the B<CAP_IPC_OWNER> capability."
2187 msgstr "引き数 I<cmd> が B<IPC_STAT> または B<MSG_STAT> に等しいが、呼び出したプロセスがメッセージキュー I<msqid> に対する読み込み許可を持っておらず、かつ B<CAP_IPC_OWNER> ケーパビリティを持っていない。"
2188
2189 #. type: TP
2190 #: build/C/man2/msgctl.2:271 build/C/man2/msgop.2:372 build/C/man2/msgop.2:425
2191 #, no-wrap
2192 msgid "B<EFAULT>"
2193 msgstr "B<EFAULT>"
2194
2195 #. type: Plain text
2196 #: build/C/man2/msgctl.2:282
2197 msgid "The argument I<cmd> has the value B<IPC_SET> or B<IPC_STAT>, but the address pointed to by I<buf> isn't accessible."
2198 msgstr "引き数 I<cmd> が B<IPC_SET> か B<IPC_STAT> で、ポインター I<buf> で指されているアドレスがアクセス可能でない。"
2199
2200 #. type: TP
2201 #: build/C/man2/msgctl.2:282 build/C/man2/msgop.2:377 build/C/man2/msgop.2:430
2202 #, no-wrap
2203 msgid "B<EIDRM>"
2204 msgstr "B<EIDRM>"
2205
2206 #. type: Plain text
2207 #: build/C/man2/msgctl.2:285 build/C/man2/msgop.2:380
2208 msgid "The message queue was removed."
2209 msgstr "メッセージキューが削除された。"
2210
2211 #. type: Plain text
2212 #: build/C/man2/msgctl.2:296
2213 msgid "Invalid value for I<cmd> or I<msqid>.  Or: for a B<MSG_STAT> operation, the index value specified in I<msqid> referred to an array slot that is currently unused."
2214 msgstr "I<cmd> または I<msqid> に不正な値が設定された。 もしくは、 B<MSG_STAT> 操作の場合に、 I<msqid> で指定されたインデックス値が現在未使用の配列のスロットを参照いていた。"
2215
2216 #. type: TP
2217 #: build/C/man2/msgctl.2:296 build/C/man2/msgctl.2:314
2218 #, no-wrap
2219 msgid "B<EPERM>"
2220 msgstr "B<EPERM>"
2221
2222 #. type: Plain text
2223 #: build/C/man2/msgctl.2:314
2224 msgid "The argument I<cmd> has the value B<IPC_SET> or B<IPC_RMID>, but the effective user ID of the calling process is not the creator (as found in I<msg_perm.cuid>)  or the owner (as found in I<msg_perm.uid>)  of the message queue, and the caller is not privileged (Linux: does not have the B<CAP_SYS_ADMIN> capability)."
2225 msgstr "引き数 I<cmd> が B<IPC_SET> か B<IPC_RMID> であるが、呼び出したプロセスの実効ユーザー ID がメッセージキューの (I<msg_perm.cuid> として見つかる) 作成者 と (I<msg_perm.uid> として見つかる) 所有者のいずれでもなく、 かつ呼び出し者に特権がない (Linux では B<CAP_SYS_ADMIN> ケーパビリティがない)。"
2226
2227 #. type: Plain text
2228 #: build/C/man2/msgctl.2:325
2229 msgid "An attempt (B<IPC_SET>)  was made to increase I<msg_qbytes> beyond the system parameter B<MSGMNB>, but the caller is not privileged (Linux: does not have the B<CAP_SYS_RESOURCE> capability)."
2230 msgstr "B<IPC_SET> で I<msg_qbytes> をシステムパラメーター B<MSGMNB> より大きな値に設定しようとしたが、呼び出し元が特権を持っていなかった (Linux では、 B<CAP_SYS_RESOURCE> ケーパビリティを持っていなかった)。"
2231
2232 #. type: Plain text
2233 #: build/C/man2/msgctl.2:328 build/C/man2/msgget.2:184
2234 #: build/C/man2/msgop.2:484
2235 msgid "SVr4, POSIX.1-2001."
2236 msgstr "SVr4, POSIX.1-2001."
2237
2238 #.  Like Linux, the FreeBSD man pages still document
2239 #.  the inclusion of these header files.
2240 #. type: Plain text
2241 #: build/C/man2/msgctl.2:341 build/C/man2/msgget.2:197
2242 #: build/C/man2/msgop.2:507
2243 msgid "The inclusion of I<E<lt>sys/types.hE<gt>> and I<E<lt>sys/ipc.hE<gt>> isn't required on Linux or by any version of POSIX.  However, some old implementations required the inclusion of these header files, and the SVID also documented their inclusion.  Applications intended to be portable to such old systems may need to include these header files."
2244 msgstr "Linux や POSIX の全てのバージョンでは、 I<E<lt>sys/types.hE<gt>> と I<E<lt>sys/ipc.hE<gt>> のインクルードは必要ない。しかしながら、いくつかの古い実装ではこれらのヘッダファイルのインクルードが必要であり、 SVID でもこれらのインクルードをするように記載されている。このような古いシステムへの移植性を意図したアプリケーションではこれらのファイルをインクルードする必要があるかもしれない。"
2245
2246 #. type: Plain text
2247 #: build/C/man2/msgctl.2:353
2248 msgid "The B<IPC_INFO>, B<MSG_STAT> and B<MSG_INFO> operations are used by the B<ipcs>(1)  program to provide information on allocated resources.  In the future these may modified or moved to a I</proc> filesystem interface."
2249 msgstr "B<IPC_INFO>, B<MSG_STAT>, B<MSG_INFO> 操作は、 B<ipcs>(1)  プログラムで割り当て済の資源に関する情報を提供するために 使用されている。将来、これらの操作は変更されたり、 I</proc> ファイルシステムのインターフェースに移動されるかもしれない。"
2250
2251 #. type: Plain text
2252 #: build/C/man2/msgctl.2:367
2253 msgid "Various fields in the I<struct msqid_ds> were typed as I<short> under Linux 2.2 and have become I<long> under Linux 2.4.  To take advantage of this, a recompilation under glibc-2.1.91 or later should suffice.  (The kernel distinguishes old and new calls by an B<IPC_64> flag in I<cmd>.)"
2254 msgstr "I<struct msqid_ds> 内の多くのフィールドは、 Linux 2.2 では I<short> だったが、Linux 2.4 では I<long> になった。 この利点を生かすには、glibc-2.1.91 以降の環境下で 再コンパイルすれば十分である。 (カーネルは新しい形式の呼び出しと古い形式の呼び出しを I<cmd> 内の B<IPC_64> フラグで区別する。)"
2255
2256 #. type: Plain text
2257 #: build/C/man2/msgctl.2:374
2258 msgid "B<msgget>(2), B<msgrcv>(2), B<msgsnd>(2), B<capabilities>(7), B<mq_overview>(7), B<svipc>(7)"
2259 msgstr "B<msgget>(2), B<msgrcv>(2), B<msgsnd>(2), B<capabilities>(7), B<mq_overview>(7), B<svipc>(7)"
2260
2261 #. type: TH
2262 #: build/C/man2/msgget.2:35
2263 #, no-wrap
2264 msgid "MSGGET"
2265 msgstr "MSGGET"
2266
2267 #. type: TH
2268 #: build/C/man2/msgget.2:35
2269 #, no-wrap
2270 msgid "2014-04-30"
2271 msgstr "2014-04-30"
2272
2273 #. type: Plain text
2274 #: build/C/man2/msgget.2:38
2275 msgid "msgget - get a System V message queue identifier"
2276 msgstr "msgget - System V メッセージキュー識別子を取得する"
2277
2278 #. type: Plain text
2279 #: build/C/man2/msgget.2:45
2280 #, no-wrap
2281 msgid "B<int msgget(key_t >I<key>B<, int >I<msgflg>B<);>\n"
2282 msgstr "B<int msgget(key_t >I<key>B<, int >I<msgflg>B<);>\n"
2283
2284 #. type: Plain text
2285 #: build/C/man2/msgget.2:67
2286 msgid "The B<msgget>()  system call returns the System\\ V message queue identifier associated with the value of the I<key> argument.  A new message queue is created if I<key> has the value B<IPC_PRIVATE> or I<key> isn't B<IPC_PRIVATE>, no message queue with the given key I<key> exists, and B<IPC_CREAT> is specified in I<msgflg>."
2287 msgstr "B<msgget>()  システムコールは I<key> 引き数の値に対応する System\\ V メッセージキューの識別子を返す。 I<key> の値が B<IPC_PRIVATE> の場合、または I<key> が B<IPC_PRIVATE> でなくても、 I<key> に対応するメッセージキューが存在せず、 I<msgflg> に B<IPC_CREAT> が指定されている場合、 新しいメッセージキューが作成される。"
2288
2289 #. type: Plain text
2290 #: build/C/man2/msgget.2:86
2291 msgid "If I<msgflg> specifies both B<IPC_CREAT> and B<IPC_EXCL> and a message queue already exists for I<key>, then B<msgget>()  fails with I<errno> set to B<EEXIST>.  (This is analogous to the effect of the combination B<O_CREAT | O_EXCL> for B<open>(2).)"
2292 msgstr "I<msgflg> に B<IPC_CREAT> と B<IPC_EXCL> の両方が指定された場合、 I<key> に対応するメッセージキューが既に存在すると、 B<msgget>()  は失敗し、 I<errno> に B<EEXIST> が設定される。 (これは B<open>(2)  に B<O_CREAT | O_EXCL> を指定した場合の動作と同じである)"
2293
2294 #. type: Plain text
2295 #: build/C/man2/msgget.2:96
2296 msgid "Upon creation, the least significant bits of the argument I<msgflg> define the permissions of the message queue.  These permission bits have the same format and semantics as the permissions specified for the I<mode> argument of B<open>(2).  (The execute permissions are not used.)"
2297 msgstr "メッセージキューの作成時に、 I<msgflg> 引き数の下位 9 ビットは、 そのメッセージキューのアクセス許可の定義として使用される。 これらの許可ビットは B<open>(2)  の引き数 I<mode> と同じ形式で同じ意味である。 や B<creat>(2)  システムコールのアクセス許可パラメーターと同じ形式で、同じ意味を持つ。 (但し、実行 (execute) 許可は使用されない。)"
2298
2299 #. type: Plain text
2300 #: build/C/man2/msgget.2:103
2301 msgid "If a new message queue is created, then its associated data structure I<msqid_ds> (see B<msgctl>(2))  is initialized as follows:"
2302 msgstr "新規のメッセージキューを作成する際、 B<msgget>()  システムコールはメッセージキューのデータ構造体 I<msqid_ds> を以下のように初期化する (I<msqid_ds> については B<msgctl>(2)  を参照):"
2303
2304 #. type: Plain text
2305 #: build/C/man2/msgget.2:108
2306 msgid "I<msg_perm.cuid> and I<msg_perm.uid> are set to the effective user ID of the calling process."
2307 msgstr "I<msg_perm.cuid> と I<msg_perm.uid> に呼び出し元プロセスの実効 (effective) ユーザーID を設定する。"
2308
2309 #. type: Plain text
2310 #: build/C/man2/msgget.2:113
2311 msgid "I<msg_perm.cgid> and I<msg_perm.gid> are set to the effective group ID of the calling process."
2312 msgstr "I<msg_perm.cgid> と I<msg_perm.gid> に呼び出し元プロセスの実効 (effective) グループID を設定する。"
2313
2314 #. type: Plain text
2315 #: build/C/man2/msgget.2:118
2316 msgid "The least significant 9 bits of I<msg_perm.mode> are set to the least significant 9 bits of I<msgflg>."
2317 msgstr "I<msg_perm.mode> の下位 9 ビットは I<msgflg> の下位 9 ビットを設定する。"
2318
2319 #. type: Plain text
2320 #: build/C/man2/msgget.2:126
2321 msgid "I<msg_qnum>, I<msg_lspid>, I<msg_lrpid>, I<msg_stime>, and I<msg_rtime> are set to 0."
2322 msgstr "I<msg_qnum>, I<msg_lspid>, I<msg_lrpid>, I<msg_stime>, I<msg_rtime> に 0 を設定される。"
2323
2324 #. type: Plain text
2325 #: build/C/man2/msgget.2:129
2326 msgid "I<msg_ctime> is set to the current time."
2327 msgstr "I<msg_ctime> に現在の時刻を設定する。"
2328
2329 #. type: Plain text
2330 #: build/C/man2/msgget.2:133
2331 msgid "I<msg_qbytes> is set to the system limit B<MSGMNB>."
2332 msgstr "I<msg_qbytes> に、システムで決められたメッセージキューの最大サイズ B<MSGMNB> を設定する。"
2333
2334 #. type: Plain text
2335 #: build/C/man2/msgget.2:137
2336 msgid "If the message queue already exists the permissions are verified, and a check is made to see if it is marked for destruction."
2337 msgstr "メッセージキューがすでに存在する場合は、アクセス許可の検査と、 破棄 (destruction) マークがないかの確認が行われる。"
2338
2339 #. type: Plain text
2340 #: build/C/man2/msgget.2:143
2341 msgid "If successful, the return value will be the message queue identifier (a nonnegative integer), otherwise -1 with I<errno> indicating the error."
2342 msgstr "成功した場合、返り値はメッセージキュー識別子 (非負の整数) となる。 失敗した場合は -1 が返され、 I<errno> にそのエラーが示される。"
2343
2344 #. type: Plain text
2345 #: build/C/man2/msgget.2:147
2346 msgid "On failure, I<errno> is set to one of the following values:"
2347 msgstr "失敗した場合、 I<errno> に以下の値のいずれか一つが設定される:"
2348
2349 #. type: Plain text
2350 #: build/C/man2/msgget.2:155
2351 msgid "A message queue exists for I<key>, but the calling process does not have permission to access the queue, and does not have the B<CAP_IPC_OWNER> capability."
2352 msgstr "I<key> に対応するメッセージキューは存在するが、 呼び出し元プロセスはそのキューに対するアクセス許可がなく、 B<CAP_IPC_OWNER> ケーパビリティも持っていない。"
2353
2354 #. type: Plain text
2355 #: build/C/man2/msgget.2:164
2356 msgid "B<IPC_CREAT> and B<IPC_EXCL> were specified in I<msgflg>, but a message queue already exists for I<key>."
2357 msgstr "I<msgflg> に B<IPC_CREAT> と B<IPC_EXCL> が指定されたが、 I<key> に対応するメッセージキューがすでに存在する。"
2358
2359 #. type: Plain text
2360 #: build/C/man2/msgget.2:172
2361 msgid "No message queue exists for I<key> and I<msgflg> did not specify B<IPC_CREAT>."
2362 msgstr "I<key> に対応するメッセージキューが存在せず、 I<msgflg> に B<IPC_CREAT> が指定されていなかった。"
2363
2364 #. type: Plain text
2365 #: build/C/man2/msgget.2:176
2366 msgid "A message queue has to be created but the system does not have enough memory for the new data structure."
2367 msgstr "メッセージキューを作成しようとしたが、新しいデータ構造体を作成 するのに十分なメモリーがシステムに存在しない。"
2368
2369 #. type: Plain text
2370 #: build/C/man2/msgget.2:182
2371 msgid "A message queue has to be created but the system limit for the maximum number of message queues (B<MSGMNI>)  would be exceeded."
2372 msgstr "メッセージキューを作成しようとしたが、作成すると システム全体のメッセージキュー数の最大値 (B<MSGMNI>)  を超えてしまう。"
2373
2374 #. type: Plain text
2375 #: build/C/man2/msgget.2:207
2376 msgid "B<IPC_PRIVATE> isn't a flag field but a I<key_t> type.  If this special value is used for I<key>, the system call ignores everything but the least significant 9 bits of I<msgflg> and creates a new message queue (on success)."
2377 msgstr "B<IPC_PRIVATE> はフラグではなく、 I<key_t> 型である。 この特別な値が I<key> として使用された場合、 B<msgget>()  システムコールは I<msgflg> の下位 9 ビット以外の全てを無視して (成功した場合は) 新しいメッセージキューを作成する。"
2378
2379 #. type: Plain text
2380 #: build/C/man2/msgget.2:211
2381 msgid "The following is a system limit on message queue resources affecting a B<msgget>()  call:"
2382 msgstr "B<msgget>()  システムコールに影響を及ぼすメッセージキューの資源の システムとしての制限を以下に示す:"
2383
2384 #. type: TP
2385 #: build/C/man2/msgget.2:211
2386 #, no-wrap
2387 msgid "B<MSGMNI>"
2388 msgstr "B<MSGMNI>"
2389
2390 #. type: Plain text
2391 #: build/C/man2/msgget.2:217
2392 msgid "System-wide limit on the number of message queues: policy dependent (on Linux, this limit can be read and modified via I</proc/sys/kernel/msgmni>)."
2393 msgstr "システム全体のメッセージキュー数の上限値: 方針依存 (Linux では、この制限値は I</proc/sys/kernel/msgmni> 経由で参照したり、変更したりできる)。"
2394
2395 #. type: SS
2396 #: build/C/man2/msgget.2:217
2397 #, no-wrap
2398 msgid "Linux notes"
2399 msgstr "Linux での注意"
2400
2401 #. type: Plain text
2402 #: build/C/man2/msgget.2:223
2403 msgid "Until version 2.3.20, Linux would return B<EIDRM> for a B<msgget>()  on a message queue scheduled for deletion."
2404 msgstr "Linux 2.3.20 までは、削除が予定されているメッセージキューに対して B<msgget>()  を行うと B<EIDRM> がエラーとして返されるようになっていた。"
2405
2406 #. type: Plain text
2407 #: build/C/man2/msgget.2:229
2408 msgid "The name choice B<IPC_PRIVATE> was perhaps unfortunate, B<IPC_NEW> would more clearly show its function."
2409 msgstr "B<IPC_PRIVATE> という名前を選んだのはおそらく失敗であろう。 B<IPC_NEW> の方がより明確にその機能を表しているだろう。"
2410
2411 #. type: Plain text
2412 #: build/C/man2/msgget.2:237
2413 msgid "B<msgctl>(2), B<msgrcv>(2), B<msgsnd>(2), B<ftok>(3), B<capabilities>(7), B<mq_overview>(7), B<svipc>(7)"
2414 msgstr "B<msgctl>(2), B<msgrcv>(2), B<msgsnd>(2), B<ftok>(3), B<capabilities>(7), B<mq_overview>(7), B<svipc>(7)"
2415
2416 #. type: TH
2417 #: build/C/man2/msgop.2:41
2418 #, no-wrap
2419 msgid "MSGOP"
2420 msgstr "MSGOP"
2421
2422 #. type: TH
2423 #: build/C/man2/msgop.2:41
2424 #, no-wrap
2425 msgid "2014-08-19"
2426 msgstr "2014-08-19"
2427
2428 #. type: Plain text
2429 #: build/C/man2/msgop.2:44
2430 msgid "msgrcv, msgsnd - System V message queue operations"
2431 msgstr "msgrcv, msgsnd - System V メッセージキュー操作"
2432
2433 #. type: Plain text
2434 #: build/C/man2/msgop.2:52
2435 #, no-wrap
2436 msgid "B<int msgsnd(int >I<msqid>B<, const void *>I<msgp>B<, size_t >I<msgsz>B<, int >I<msgflg>B<);>\n"
2437 msgstr "B<int msgsnd(int >I<msqid>B<, const void *>I<msgp>B<, size_t >I<msgsz>B<, int >I<msgflg>B<);>\n"
2438
2439 #. type: Plain text
2440 #: build/C/man2/msgop.2:56
2441 #, no-wrap
2442 msgid ""
2443 "B<ssize_t msgrcv(int >I<msqid>B<, void *>I<msgp>B<, size_t >I<msgsz>B<, long >I<msgtyp>B<,>\n"
2444 "B<               int >I<msgflg>B<);>\n"
2445 msgstr ""
2446 "B<ssize_t msgrcv(int >I<msqid>B<, void *>I<msgp>B<, size_t >I<msgsz>B<, long >I<msgtyp>B<,>\n"
2447 "B<               int >I<msgflg>B<);>\n"
2448
2449 #. type: Plain text
2450 #: build/C/man2/msgop.2:66
2451 msgid "The B<msgsnd>()  and B<msgrcv>()  system calls are used, respectively, to send messages to, and receive messages from, a System\\ V message queue.  The calling process must have write permission on the message queue in order to send a message, and read permission to receive a message."
2452 msgstr "システムコール B<msgsnd>()  と B<msgrcv>()  はそれぞれ、 System\\ V メッセージキューへのメッセージの送信と、 メッセージの受信に使用される。呼び出し元プロセスは、 メッセージを送信するためにはメッセージキューに対する書き込み許可を、 メッセージを受信するためには読み出し許可を持っていなければならない。"
2453
2454 #. type: Plain text
2455 #: build/C/man2/msgop.2:71
2456 msgid "The I<msgp> argument is a pointer to a caller-defined structure of the following general form:"
2457 msgstr "呼び出し元プロセスは以下に示す構造体を用意し、この構造体への ポインターを I<msgp> 引き数として渡す。"
2458
2459 #. type: Plain text
2460 #: build/C/man2/msgop.2:78
2461 #, no-wrap
2462 msgid ""
2463 "struct msgbuf {\n"
2464 "    long mtype;       /* message type, must be E<gt> 0 */\n"
2465 "    char mtext[1];    /* message data */\n"
2466 "};\n"
2467 msgstr ""
2468 "struct msgbuf {\n"
2469 "    long mtype;       /* message type, must be E<gt> 0 */\n"
2470 "    char mtext[1];    /* message data */\n"
2471 "};\n"
2472
2473 #. type: Plain text
2474 #: build/C/man2/msgop.2:97
2475 msgid "The I<mtext> field is an array (or other structure) whose size is specified by I<msgsz>, a nonnegative integer value.  Messages of zero length (i.e., no I<mtext> field) are permitted.  The I<mtype> field must have a strictly positive integer value.  This value can be used by the receiving process for message selection (see the description of B<msgrcv>()  below)."
2476 msgstr "I<mtext> フィールドは配列 (または他の構造体) で、その大きさは 非負の整数である I<msgsz> で指定される。 長さ 0 のメッセージ (つまり I<mtext> フィールドがないメッセージ) も認められている。 B<mtype> フィールドは厳密に正の整数でなければならない。 この値は、メッセージを受信するプロセスでメッセージを選択するために 使用される (下記の B<msgrcv>()  の説明を参照のこと)。"
2477
2478 #. type: SS
2479 #: build/C/man2/msgop.2:97
2480 #, no-wrap
2481 msgid "msgsnd()"
2482 msgstr "msgsnd()"
2483
2484 #. type: Plain text
2485 #: build/C/man2/msgop.2:105
2486 msgid "The B<msgsnd>()  system call appends a copy of the message pointed to by I<msgp> to the message queue whose identifier is specified by I<msqid>."
2487 msgstr "B<msgsnd>()  システムコールは I<msgp> 引き数で指定されたメッセージのコピーを I<msqid> で指定された識別子を持つメッセージキューへ追加する。"
2488
2489 #. type: Plain text
2490 #: build/C/man2/msgop.2:118
2491 msgid "If sufficient space is available in the queue, B<msgsnd>()  succeeds immediately.  The queue capacity is governed by the I<msg_qbytes> field in the associated data structure for the message queue.  During queue creation this field is initialized to B<MSGMNB> bytes, but this limit can be modified using B<msgctl>(2).  A message queue is considered to be full if either of the following conditions is true:"
2492 msgstr "キューに十分な空き容量がある場合、 B<msgsnd>()  は直ちに成功する。 キューの容量は、メッセージキューのデータ構造体の I<msg_qbytes> フィールドで制御される。 キュー作成時にこのフィールドは B<MSGMNB> に初期化されるが、この制限は B<msgctl>(2)  を使って変更できる。 次のいずれかの条件が成立する場合に、メッセージキューは一杯と判断される。"
2493
2494 #. type: Plain text
2495 #: build/C/man2/msgop.2:123
2496 msgid "Adding a new message to the queue would cause the total number of bytes in the queue to exceed the queue's maximum size (the I<msg_qbytes> field)."
2497 msgstr "新しいメッセージをそのキューに追加すると、 そのキューの全バイト数がキューの最大サイズ (I<msg_qbytes> フィールド) を超過してしまう場合。"
2498
2499 #. type: Plain text
2500 #: build/C/man2/msgop.2:132
2501 msgid "Adding another message to the queue would cause the total number of messages in the queue to exceed the queue's maximum size (the I<msg_qbytes> field).  This check is necessary to prevent an unlimited number of zero-length messages being placed on the queue.  Although such messages contain no data, they nevertheless consume (locked) kernel memory."
2502 msgstr "そのキューにもう一つメッセージを追加すると、 そのキューが全メッセージ数がキューの最大サイズ (I<msg_qbytes> フィールド) を超過してしまう場合。 このチェックは、無限個の長さ 0 のメッセージをそのキューに追加するのを防ぐために必要である。 長さ 0 のメッセージはデータを含まないが、 (ロックされた) カーネルメモリーを消費するからである。"
2503
2504 #. type: Plain text
2505 #: build/C/man2/msgop.2:143
2506 msgid "If insufficient space is available in the queue, then the default behavior of B<msgsnd>()  is to block until space becomes available.  If B<IPC_NOWAIT> is specified in I<msgflg>, then the call instead fails with the error B<EAGAIN>."
2507 msgstr "そのキューに十分な領域がない場合、 デフォルトの動作では、 必要な領域ができるまで B<msgsnd>() は停止 (block) する。 I<msgflg> に B<IPC_NOWAIT> が指定された場合、 B<msgsnd>() はエラー B<EAGAIN> で失敗する。"
2508
2509 #. type: Plain text
2510 #: build/C/man2/msgop.2:147
2511 msgid "A blocked B<msgsnd>()  call may also fail if:"
2512 msgstr "停止している B<msgsnd>()  は以下の場合にも失敗する。"
2513
2514 #. type: Plain text
2515 #: build/C/man2/msgop.2:154
2516 msgid "the queue is removed, in which case the system call fails with I<errno> set to B<EIDRM>; or"
2517 msgstr "キューが削除された。 この場合、 I<errno> は B<EIDRM> に設定される。"
2518
2519 #. type: Plain text
2520 #: build/C/man2/msgop.2:166
2521 msgid "a signal is caught, in which case the system call fails with I<errno> set to B<EINTR>;B<see> B<signal>(7).  (B<msgsnd>()  is never automatically restarted after being interrupted by a signal handler, regardless of the setting of the B<SA_RESTART> flag when establishing a signal handler.)"
2522 msgstr "シグナルが捕捉された。 この場合、 I<errno> は B<EINTR> に設定される。 B<signal>(7)  参照。 (B<msgsnd>()  は、たとえシグナルハンドラーの設定時に B<SA_RESTART> を指定していたとしても、シグナルハンドラーによって割り込まれた後で 自動的に再スタートすることは決してない。)"
2523
2524 #. type: Plain text
2525 #: build/C/man2/msgop.2:169 build/C/man2/msgop.2:330
2526 msgid "Upon successful completion the message queue data structure is updated as follows:"
2527 msgstr "正常に終了した場合、メッセージキューのデータ構造体は以下のように 更新される:"
2528
2529 #. type: Plain text
2530 #: build/C/man2/msgop.2:172
2531 msgid "I<msg_lspid> is set to the process ID of the calling process."
2532 msgstr "I<msg_lspid> には呼び出し元プロセスのプロセス ID が設定される。"
2533
2534 #. type: Plain text
2535 #: build/C/man2/msgop.2:175
2536 msgid "I<msg_qnum> is incremented by 1."
2537 msgstr "I<msg_qnum> は 1 増加する。"
2538
2539 #. type: Plain text
2540 #: build/C/man2/msgop.2:178
2541 msgid "I<msg_stime> is set to the current time."
2542 msgstr "I<msg_stime> には現在時刻が設定される。"
2543
2544 #. type: SS
2545 #: build/C/man2/msgop.2:178
2546 #, no-wrap
2547 msgid "msgrcv()"
2548 msgstr "msgrcv()"
2549
2550 #. type: Plain text
2551 #: build/C/man2/msgop.2:186
2552 msgid "The B<msgrcv>()  system call removes a message from the queue specified by I<msqid> and places it in the buffer pointed to by I<msgp>."
2553 msgstr "B<msgrcv>()  システムコールは I<msqid> で指定されたキューからメッセージを削除し、 I<msgp> で指定されたバッファーにそのメッセージを格納する。"
2554
2555 #. type: Plain text
2556 #: build/C/man2/msgop.2:212
2557 msgid "The argument I<msgsz> specifies the maximum size in bytes for the member I<mtext> of the structure pointed to by the I<msgp> argument.  If the message text has length greater than I<msgsz>, then the behavior depends on whether B<MSG_NOERROR> is specified in I<msgflg>.  If B<MSG_NOERROR> is specified, then the message text will be truncated (and the truncated part will be lost); if B<MSG_NOERROR> is not specified, then the message isn't removed from the queue and the system call fails returning -1 with I<errno> set to B<E2BIG>."
2558 msgstr "I<msgsz> 引き数には I<msgp> 引き数で指定された構造体の I<mtext> メンバーの最大のバイト数を指定する。 メッセージのテキストの長さが I<msgsz> より大きい場合の動作は、 I<msgflg> に B<MSG_NOERROR> が指定されているかどうかで決まる。 B<MSG_NOERROR> が指定されていれば、メッセージのテキストは切り詰められる (切り捨てられた部分は失われる)。 B<MSG_NOERROR> が指定されていなければ、メッセージはキューから削除されず、 システムコールは -1 を返して失敗し、 I<errno> に B<E2BIG> が設定される。"
2559
2560 #. type: Plain text
2561 #: build/C/man2/msgop.2:221
2562 msgid "Unless B<MSG_COPY> is specified in I<msgflg> (see below), the I<msgtyp> argument specifies the type of message requested, as follows:"
2563 msgstr "B<MSG_COPY> が I<msgflg> に指定されていない場合 (下記参照)、 I<msgtyp> 引き数には要求するメッセージの型を指定する。 型は以下のように指定する:"
2564
2565 #. type: Plain text
2566 #: build/C/man2/msgop.2:226
2567 msgid "If I<msgtyp> is 0, then the first message in the queue is read."
2568 msgstr "I<msgtyp> が 0 ならば、キューの最初にあるメッセージが読み込まれる。"
2569
2570 #. type: Plain text
2571 #: build/C/man2/msgop.2:240
2572 msgid "If I<msgtyp> is greater than 0, then the first message in the queue of type I<msgtyp> is read, unless B<MSG_EXCEPT> was specified in I<msgflg>, in which case the first message in the queue of type not equal to I<msgtyp> will be read."
2573 msgstr "I<msgtyp> が 0 より大きい場合、 I<msgflg> に B<MSG_EXCEPT> が指定されていなければ、 I<msgtyp> 型のキューの最初のメッセージが読み込まれる。 B<MSG_EXCEPT> が指定された場合は、 I<msgtyp> 型以外のキューの最初のメッセージが読み込まれる。"
2574
2575 #. type: Plain text
2576 #: build/C/man2/msgop.2:248
2577 msgid "If I<msgtyp> is less than 0, then the first message in the queue with the lowest type less than or equal to the absolute value of I<msgtyp> will be read."
2578 msgstr "I<msgtyp> が 0 より小さければ、 I<msgtyp> の絶対値以下で最も小さい型を持つキューの最初のメッセージが読み込まれる。"
2579
2580 #. type: Plain text
2581 #: build/C/man2/msgop.2:253
2582 msgid "The I<msgflg> argument is a bit mask constructed by ORing together zero or more of the following flags:"
2583 msgstr "I<msgflg> 引き数には、以下のフラグを任意の数だけ (0個も可)、これらの OR で指定する:"
2584
2585 #. type: TP
2586 #: build/C/man2/msgop.2:253
2587 #, no-wrap
2588 msgid "B<IPC_NOWAIT>"
2589 msgstr "B<IPC_NOWAIT>"
2590
2591 #. type: Plain text
2592 #: build/C/man2/msgop.2:260
2593 msgid "Return immediately if no message of the requested type is in the queue.  The system call fails with I<errno> set to B<ENOMSG>."
2594 msgstr "キューに要求された型のメッセージがない場合には直ちに返る。 システムコールは失敗し、 I<errno> には B<ENOMSG> が設定される。"
2595
2596 #. type: TP
2597 #: build/C/man2/msgop.2:260
2598 #, no-wrap
2599 msgid "B<MSG_COPY> (since Linux 3.8)"
2600 msgstr "B<MSG_COPY> (Linux 3.8 以降)"
2601
2602 #.  commit 4a674f34ba04a002244edaf891b5da7fc1473ae8
2603 #. type: Plain text
2604 #: build/C/man2/msgop.2:267
2605 msgid "Nondestructively fetch a copy of the message at the ordinal position in the queue specified by I<msgtyp> (messages are considered to be numbered starting at 0)."
2606 msgstr "キューの中で I<msgtyp> で指定した位置にあるメッセージのコピーを、キューを変更せずに (非破壊的に) 取り出す (メッセージの位置は 0 から順番に番号が割り当てられる)。"
2607
2608 #. type: Plain text
2609 #: build/C/man2/msgop.2:281
2610 msgid "This flag must be specified in conjunction with B<IPC_NOWAIT>, with the result that, if there is no message available at the given position, the call fails immediately with the error B<ENOMSG>.  Because they alter the meaning of I<msgtyp> in orthogonal ways, B<MSG_COPY> and B<MSG_EXCEPT> may not both be specified in I<msgflg>."
2611 msgstr "このフラグは B<IPC_NOWAIT> と組み合わせて指定しなければならない。 その結果、指定した位置にメッセージがなかった場合、呼び出しはエラー B<ENOMSG> ですぐに失敗する。 B<MSG_COPY> と B<MSG_EXCEPT> は I<msgtyp> の意味を相容れない方法で使用するため、この二つのフラグの両方を I<msgtyp> に指定することはできない。"
2612
2613 #. type: Plain text
2614 #: build/C/man2/msgop.2:289
2615 msgid "The B<MSG_COPY> flag was added for the implementation of the kernel checkpoint-restore facility and is available only if the kernel was built with the B<CONFIG_CHECKPOINT_RESTORE> option."
2616 msgstr "B<MSG_COPY> フラグは、 カーネルのチェックポイント復元 (checkpoint-restore) 機能の実装のために追加された。 このフラグはカーネルが B<CONFIG_CHECKPOINT_RESTORE> オプションを有効にして作成された場合にのみ利用できる。"
2617
2618 #. type: TP
2619 #: build/C/man2/msgop.2:289
2620 #, no-wrap
2621 msgid "B<MSG_EXCEPT>"
2622 msgstr "B<MSG_EXCEPT>"
2623
2624 #. type: Plain text
2625 #: build/C/man2/msgop.2:297
2626 msgid "Used with I<msgtyp> greater than 0 to read the first message in the queue with message type that differs from I<msgtyp>."
2627 msgstr "0 より大きな I<msgtyp> と一緒に使用して、 I<msgtyp> 以外のキューの最初のメッセージを読み込む。"
2628
2629 #. type: TP
2630 #: build/C/man2/msgop.2:297
2631 #, no-wrap
2632 msgid "B<MSG_NOERROR>"
2633 msgstr "B<MSG_NOERROR>"
2634
2635 #. type: Plain text
2636 #: build/C/man2/msgop.2:302
2637 msgid "To truncate the message text if longer than I<msgsz> bytes."
2638 msgstr "I<msgsz> バイトよりも長かった場合はメッセージのテキストを切り詰める。"
2639
2640 #. type: Plain text
2641 #: build/C/man2/msgop.2:308
2642 msgid "If no message of the requested type is available and B<IPC_NOWAIT> isn't specified in I<msgflg>, the calling process is blocked until one of the following conditions occurs:"
2643 msgstr "要求された型のメッセージが存在せず、 I<msgflg> に B<IPC_NOWAIT> が指定されていなかった場合、呼び出し元プロセスは 以下のいずれかの状況になるまで停止 (block) される:"
2644
2645 #. type: Plain text
2646 #: build/C/man2/msgop.2:310
2647 msgid "A message of the desired type is placed in the queue."
2648 msgstr "要求している型のメッセージがキューへ入れられた。"
2649
2650 #. type: Plain text
2651 #: build/C/man2/msgop.2:316
2652 msgid "The message queue is removed from the system.  In this case, the system call fails with I<errno> set to B<EIDRM>."
2653 msgstr "メッセージキューがシステムから削除された。 この場合、システムコールは失敗し、 I<errno> に B<EIDRM> が設定される。"
2654
2655 #. type: Plain text
2656 #: build/C/man2/msgop.2:327
2657 msgid "The calling process catches a signal.  In this case, the system call fails with I<errno> set to B<EINTR>.  (B<msgrcv>()  is never automatically restarted after being interrupted by a signal handler, regardless of the setting of the B<SA_RESTART> flag when establishing a signal handler.)"
2658 msgstr "呼び出し元プロセスがシグナルを捕獲した。 この場合、システムコールは失敗し、 I<errno> に B<EINTR> が設定される。 (B<msgrcv>()  は、たとえシグナルハンドラーの設定時に B<SA_RESTART> を指定していたとしても、シグナルハンドラーによって割り込まれた後で 自動的に再スタートすることは決してない。)"
2659
2660 #. type: Plain text
2661 #: build/C/man2/msgop.2:333
2662 msgid "I<msg_lrpid> is set to the process ID of the calling process."
2663 msgstr "I<msg_lrpid> には呼び出し元プロセスのプロセス ID が設定される。"
2664
2665 #. type: Plain text
2666 #: build/C/man2/msgop.2:336
2667 msgid "I<msg_qnum> is decremented by 1."
2668 msgstr "I<msg_qnum> は 1 減算される。"
2669
2670 #. type: Plain text
2671 #: build/C/man2/msgop.2:339
2672 msgid "I<msg_rtime> is set to the current time."
2673 msgstr "I<msg_rtime> には現在の時刻が設定される。"
2674
2675 #. type: Plain text
2676 #: build/C/man2/msgop.2:352
2677 msgid "On failure both functions return -1 with I<errno> indicating the error, otherwise B<msgsnd>()  returns 0 and B<msgrcv>()  returns the number of bytes actually copied into the I<mtext> array."
2678 msgstr "失敗した場合は、どちらの関数も -1 を返し、エラーを I<errno> に表示する。成功した場合、 B<msgsnd>()  は 0 を返し、 B<msgrcv>()  は I<mtext> 配列に実際にコピーしたバイト数を返す。"
2679
2680 #. type: Plain text
2681 #: build/C/man2/msgop.2:358
2682 msgid "When B<msgsnd>()  fails, I<errno> will be set to one among the following values:"
2683 msgstr "B<msgsnd>()  が失敗した場合、 B<errno> に以下の値のいずれかが設定される:"
2684
2685 #. type: Plain text
2686 #: build/C/man2/msgop.2:364
2687 msgid "The calling process does not have write permission on the message queue, and does not have the B<CAP_IPC_OWNER> capability."
2688 msgstr "呼び出し元プロセスにはメッセージキューに対する書き込み許可がなく、 B<CAP_IPC_OWNER> ケーパビリティもない。"
2689
2690 #. type: Plain text
2691 #: build/C/man2/msgop.2:372
2692 msgid "The message can't be sent due to the I<msg_qbytes> limit for the queue and B<IPC_NOWAIT> was specified in I<msgflg>."
2693 msgstr "I<msg_qbytes> がキューの制限を超えていたため、メッセージを送ることができず、かつ I<msgflg> に B<IPC_NOWAIT> が指定されていた。"
2694
2695 #. type: Plain text
2696 #: build/C/man2/msgop.2:377 build/C/man2/msgop.2:430
2697 msgid "The address pointed to by I<msgp> isn't accessible."
2698 msgstr "I<msgp> が指しているアドレスがアクセス可能でない。"
2699
2700 #. type: Plain text
2701 #: build/C/man2/msgop.2:383
2702 msgid "Sleeping on a full message queue condition, the process caught a signal."
2703 msgstr "メッセージキューが要求した条件を満たすまで停止している時に、 プロセスがシグナルを捕獲した。"
2704
2705 #. type: Plain text
2706 #: build/C/man2/msgop.2:394
2707 msgid "Invalid I<msqid> value, or nonpositive I<mtype> value, or invalid I<msgsz> value (less than 0 or greater than the system value B<MSGMAX>)."
2708 msgstr "I<msqid> が不適切な値であるか、 I<mtype> が正の値でないか、 I<msgsz> が不適切な値 (0 以下か、システムで決まる値 B<MSGMAX> よりも大きい値) である。"
2709
2710 #. type: Plain text
2711 #: build/C/man2/msgop.2:399
2712 msgid "The system does not have enough memory to make a copy of the message pointed to by I<msgp>."
2713 msgstr "I<msgp> が指すメッセージのコピーを作成するのに十分なメモリーがシステムに存在しない。"
2714
2715 #. type: Plain text
2716 #: build/C/man2/msgop.2:405
2717 msgid "When B<msgrcv>()  fails, I<errno> will be set to one among the following values:"
2718 msgstr "B<msgrcv>()  が失敗した場合には I<errno> に以下の値のいずれかが設定される:"
2719
2720 #. type: TP
2721 #: build/C/man2/msgop.2:405
2722 #, no-wrap
2723 msgid "B<E2BIG>"
2724 msgstr "B<E2BIG>"
2725
2726 #. type: Plain text
2727 #: build/C/man2/msgop.2:413
2728 msgid "The message text length is greater than I<msgsz> and B<MSG_NOERROR> isn't specified in I<msgflg>."
2729 msgstr "メッセージのテキストの長さが I<msgsz> よりも大きく、 I<msgflg> に B<MSG_NOERROR> が設定されていなかった。"
2730
2731 #. type: Plain text
2732 #: build/C/man2/msgop.2:419
2733 msgid "The calling process does not have read permission on the message queue, and does not have the B<CAP_IPC_OWNER> capability."
2734 msgstr "呼び出し元プロセスにはメッセージキューに対する読み込み許可がなく、 B<CAP_IPC_OWNER> ケーパビリティもない。"
2735
2736 #. type: Plain text
2737 #: build/C/man2/msgop.2:425
2738 msgid "No message was available in the queue and B<IPC_NOWAIT> was specified in I<msgflg>."
2739 msgstr "キューにはメッセージがなく、 I<msgflg> に B<IPC_NOWAIT> が指定された。"
2740
2741 #. type: Plain text
2742 #: build/C/man2/msgop.2:434
2743 msgid "While the process was sleeping to receive a message, the message queue was removed."
2744 msgstr "メッセージを受信するためにプロセスが停止している間に、 メッセージキューが削除された。"
2745
2746 #. type: Plain text
2747 #: build/C/man2/msgop.2:439
2748 msgid "While the process was sleeping to receive a message, the process caught a signal; see B<signal>(7)."
2749 msgstr "メッセージを受けるためにプロセスが停止している間に、 プロセスがシグナルを捕獲した。 B<signal>(7)  参照。"
2750
2751 #. type: Plain text
2752 #: build/C/man2/msgop.2:445
2753 msgid "I<msgqid> was invalid, or I<msgsz> was less than 0."
2754 msgstr "I<msgqid> が不正か、 I<msgsz> が 0 より小さい。"
2755
2756 #. type: TP
2757 #: build/C/man2/msgop.2:445 build/C/man2/msgop.2:452
2758 #, no-wrap
2759 msgid "B<EINVAL> (since Linux 3.14)"
2760 msgstr "B<EINVAL> (Linux 3.14 以降)"
2761
2762 #. type: Plain text
2763 #: build/C/man2/msgop.2:452
2764 msgid "I<msgflg> specified B<MSG_COPY>, but not B<IPC_NOWAIT>."
2765 msgstr "I<msgflg> に B<MSG_COPY> が指定されたが、 B<IPC_NOWAIT> が指定されていない。"
2766
2767 #. type: Plain text
2768 #: build/C/man2/msgop.2:459
2769 msgid "I<msgflg> specified both B<MSG_COPY> and B<MSG_EXCEPT>."
2770 msgstr "I<msgflg> に B<MSG_COPY> と B<MSG_EXCEPT> の両方が指定された。"
2771
2772 #. type: TP
2773 #: build/C/man2/msgop.2:459 build/C/man2/msgop.2:465
2774 #, no-wrap
2775 msgid "B<ENOMSG>"
2776 msgstr "B<ENOMSG>"
2777
2778 #. type: Plain text
2779 #: build/C/man2/msgop.2:465
2780 msgid "B<IPC_NOWAIT> was specified in I<msgflg> and no message of the requested type existed on the message queue."
2781 msgstr "I<msgflg> に B<IPC_NOWAIT> が設定されており、 メッセージキューに要求された型のメッセージが存在しなかった。"
2782
2783 #. type: Plain text
2784 #: build/C/man2/msgop.2:475
2785 msgid "B<IPC_NOWAIT> and B<MSG_COPY> were specified in I<msgflg> and the queue contains less than I<msgtyp> messages."
2786 msgstr "B<IPC_NOWAIT> と B<MSG_COPY> が I<msgflg> に指定されたが、 キューには I<msgtyp> 未満のメッセージしか入っていなかった。"
2787
2788 #. type: TP
2789 #: build/C/man2/msgop.2:475
2790 #, no-wrap
2791 msgid "B<ENOSYS> (since Linux 3.8)"
2792 msgstr "B<ENOSYS> (Linux 3.8 以降)"
2793
2794 #. type: Plain text
2795 #: build/C/man2/msgop.2:482
2796 msgid "I<MSG_COPY> was specified in I<msgflg>, and this kernel was configured without B<CONFIG_CHECKPOINT_RESTORE>."
2797 msgstr "I<msgflg> に I<MSG_COPY> が指定されたが、カーネルが B<CONFIG_CHECKPOINT_RESTORE> なしで作成されている。"
2798
2799 #.  MSG_COPY since glibc 2.18
2800 #. type: Plain text
2801 #: build/C/man2/msgop.2:494
2802 msgid "The B<MSG_EXCEPT> and B<MSG_COPY> flags are Linux-specific; their definitions can be obtained by defining the B<_GNU_SOURCE> feature test macro."
2803 msgstr "フラグ B<MSG_EXCEPT> と B<MSG_COPY> は Linux 固有である。 これらの定義を得るには、機能検査マクロ B<_GNU_SOURCE> を定義する。"
2804
2805 #. type: Plain text
2806 #: build/C/man2/msgop.2:514
2807 msgid "The I<msgp> argument is declared as I<struct msgbuf\\ *> in glibc 2.0 and 2.1.  It is declared as I<void\\ *> in glibc 2.2 and later, as required by SUSv2 and SUSv3."
2808 msgstr "I<msgp> 引き数は、 glibc 2.0 と 2.1 では I<struct msgbuf\\ *> と宣言されている。glibc 2.2 以降では、 SUSv2 と SUSv3 の要求通り、I<void\\ *> と宣言されている。"
2809
2810 #. type: Plain text
2811 #: build/C/man2/msgop.2:518
2812 msgid "The following limits on message queue resources affect the B<msgsnd>()  call:"
2813 msgstr "以下は B<msgsnd> システムコールに影響するシステム制限である:"
2814
2815 #. type: TP
2816 #: build/C/man2/msgop.2:518
2817 #, no-wrap
2818 msgid "B<MSGMAX>"
2819 msgstr "B<MSGMAX>"
2820
2821 #. type: Plain text
2822 #: build/C/man2/msgop.2:523
2823 msgid "Maximum size for a message text: 8192 bytes (on Linux, this limit can be read and modified via I</proc/sys/kernel/msgmax>)."
2824 msgstr "メッセージのテキストの最大サイズ: 8192 バイト (Linux では、この制限値は I</proc/sys/kernel/msgmax> 経由で読み出したり変更したりできる)。"
2825
2826 #. type: TP
2827 #: build/C/man2/msgop.2:523
2828 #, no-wrap
2829 msgid "B<MSGMNB>"
2830 msgstr "B<MSGMNB>"
2831
2832 #. type: Plain text
2833 #: build/C/man2/msgop.2:537
2834 msgid "Default maximum size in bytes of a message queue: 16384 bytes (on Linux, this limit can be read and modified via I</proc/sys/kernel/msgmnb>).  A privileged process (Linux: a process with the B<CAP_SYS_RESOURCE> capability)  can increase the size of a message queue beyond B<MSGMNB> by a B<msgctl>(2)  system call."
2835 msgstr "バイト単位でのメッセージキューのデフォルトの最大サイズ : 16384 バイト。 (Linux では、この制限値は I</proc/sys/kernel/msgmnb> 経由で読み出したり変更したりできる)。 特権プロセス (Linux ではケーパビリティ B<CAP_SYS_RESOURCE> を持ったプロセス) は B<msgctl>(2)  システムコールでメッセージキューのサイズを B<MSGMNB> よりも大きい値に増やすことができる。"
2836
2837 #. type: Plain text
2838 #: build/C/man2/msgop.2:543
2839 msgid "The implementation has no intrinsic system-wide limits on the number of message headers (B<MSGTQL>)  and the number of bytes in the message pool (B<MSGPOOL>)."
2840 msgstr "現在の実装では、システム全体のメッセージヘッダーの上限数 (B<MSGTQL>)  と、システム全体のメッセージプールの最大バイト数 (B<MSGPOOL>)  に関して実装依存の制限はない。"
2841
2842 #.  http://marc.info/?l=linux-kernel&m=139048542803605&w=2
2843 #.  commit 4f87dac386cc43d5525da7a939d4b4e7edbea22c
2844 #. type: Plain text
2845 #: build/C/man2/msgop.2:563
2846 msgid "In Linux 3.13 and earlier, if B<msgrcv>()  was called with the B<MSG_COPY> flag, but without B<IPC_NOWAIT>, and the message queue contained less than I<msgtyp> messages, then the call would block until the next message is written to the queue.  At that point, the call would return a copy of the message, I<regardless> of whether that message was at the ordinal position I<msgtyp>.  This bug is fixed in Linux 3.14."
2847 msgstr "Linux 3.13 以前では、 B<msgrcv>() の呼び出しで B<MSG_COPY> フラグは指定されたが B<IPC_NOWAIT> は指定されず、かつメッセージキューに I<msgtyp> 未満のメッセージしかない場合に、 B<msgrcv>() の呼び出しはキューに次のメッセージが書き込まれるまで停止していた。 新しいメッセージが書き込まれた時点で、 そのメッセージが指定された位置 I<msgtyp> かどうかにI<関わらず>、 B<msgrcv>() の呼び出しは新たに書き込まれたメッセージのコピーを返していた。 このバグは Linux 3.14で修正された。"
2848
2849 #.  http://marc.info/?l=linux-kernel&m=139048542803605&w=2
2850 #.  commit 4f87dac386cc43d5525da7a939d4b4e7edbea22c
2851 #. type: Plain text
2852 #: build/C/man2/msgop.2:579
2853 msgid "Specifying both B<MSG_COPY> and B<MSC_EXCEPT> in I<msgflg> is a logical error (since these flags impose different interpretations on I<msgtyp>).  In Linux 3.13 and earlier, this error was not diagnosed by B<msgrcv>().  This bug is fixed in Linux 3.14."
2854 msgstr "I<msg_copy> に B<MSG_COPY> と B<MSG_EXCEPT> の両方を指定するのは、論理的なエラーである (なぜならこれらのフラグは I<msgtyp> を別の意味で解釈するからである)。 Linux 3.13 以前では、B<msgrcv>() がこのエラーを検出しなかった。 このバグは Linux 3.14 で修正された。"
2855
2856 #. type: Plain text
2857 #: build/C/man2/msgop.2:585
2858 msgid "B<msgctl>(2), B<msgget>(2), B<capabilities>(7), B<mq_overview>(7), B<svipc>(7)"
2859 msgstr "B<msgctl>(2), B<msgget>(2), B<capabilities>(7), B<mq_overview>(7), B<svipc>(7)"