OSDN Git Service

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