OSDN Git Service

22d244f087f2a19965dae64ec195c465ad79146e
[linuxjm/LDP_man-pages.git] / draft / man2 / msgop.2
1 .\" Copyright 1993 Giorgio Ciucci <giorgio@crcc.it>
2 .\"
3 .\" Permission is granted to make and distribute verbatim copies of this
4 .\" manual provided the copyright notice and this permission notice are
5 .\" preserved on all copies.
6 .\"
7 .\" Permission is granted to copy and distribute modified versions of this
8 .\" manual under the conditions for verbatim copying, provided that the
9 .\" entire resulting derived work is distributed under the terms of a
10 .\" permission notice identical to this one.
11 .\"
12 .\" Since the Linux kernel and libraries are constantly changing, this
13 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
14 .\" responsibility for errors or omissions, or for damages resulting from
15 .\" the use of the information contained herein.  The author(s) may not
16 .\" have taken the same level of care in the production of this manual,
17 .\" which is licensed free of charge, as they might when working
18 .\" professionally.
19 .\"
20 .\" Formatted or processed versions of this manual, if unaccompanied by
21 .\" the source, must acknowledge the copyright and authors of this work.
22 .\"
23 .\" Modified Tue Oct 22 16:40:11 1996 by Eric S. Raymond <esr@thyrsus.com>
24 .\" Modified Mon Jul 10 21:09:59 2000 by aeb
25 .\" Modified 1 Jun 2002, Michael Kerrisk <mtk.manpages@gmail.com>
26 .\"     Language clean-ups.
27 .\"     Enhanced and corrected information on msg_qbytes, MSGMNB and MSGMAX
28 .\"     Added note on restart behavior of msgsnd() and msgrcv()
29 .\"     Formatting clean-ups (argument and field names marked as .I
30 .\"             instead of .B)
31 .\" Modified, 27 May 2004, Michael Kerrisk <mtk.manpages@gmail.com>
32 .\"     Added notes on capability requirements
33 .\" Modified, 11 Nov 2004, Michael Kerrisk <mtk.manpages@gmail.com>
34 .\"     Language and formatting clean-ups
35 .\"     Added notes on /proc files
36 .\" FIXME . Add example programs to this page.
37 .\"
38 .\" Japanese Version Copyright (c) 1997 HANATAKA Shinya
39 .\"         all rights reserved.
40 .\" Translated 1997-02-23, HANATAKA Shinya <hanataka@abyss.rim.or.jp>
41 .\" Modified 2000-09-23, HANATAKA Shinya <hanataka@abyss.rim.or.jp>
42 .\" Updated 2002-11-26, Kentaro Shirakata <argrath@ub32.org>
43 .\" Updated 2005-03-04, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
44 .\" Updated 2006-03-05, Akihiro MOTOKI, LDP v2.25
45 .\" Updated 2008-08-09, Akihiro MOTOKI, LDP v3.05
46 .\"
47 .\"WORD:        message                 メッセージ
48 .\"WORD:        operation               操作
49 .\"WORD:        queue                   キュー
50 .\"WORD:        process                 プロセス
51 .\"WORD:        catch                   捕獲(catch)
52 .\"WORD:        signal                  シグナル
53 .\"WORD:        suspend                 停止(suspend)
54 .\"WORD:        sleep                   停止(sleep)
55 .\"WORD:        block                   停止(block)
56 .\"WORD:        process-ID              プロセスID
57 .\"WORD:        type                    型
58 .\"WORD:        policy                  方針
59 .\"WORD:        super-user              スーパー・ユーザー
60 .\"WORD:        current time            現在時刻
61 .\"WORD:        implement               実装
62 .\"
63 .TH MSGOP 2 2008-04-23 "Linux" "Linux Programmer's Manual"
64 .\"O .SH NAME
65 .SH 名前
66 .\"O msgrcv, msgsnd \- message operations
67 msgrcv, msgsnd \- メッセージ操作
68 .\"O .SH SYNOPSIS
69 .SH 書式
70 .nf
71 .B #include <sys/types.h>
72 .B #include <sys/ipc.h>
73 .B #include <sys/msg.h>
74 .sp
75 .BI "int msgsnd(int " msqid ", const void *" msgp ", size_t " msgsz \
76 ", int " msgflg );
77 .sp
78 .BI "ssize_t msgrcv(int " msqid ", void *" msgp ", size_t " msgsz \
79 ", long " msgtyp ,
80 .BI "               int " msgflg );
81 .fi
82 .\"O .SH DESCRIPTION
83 .SH 説明
84 .\"O The
85 .\"O .BR msgsnd ()
86 .\"O and
87 .\"O .BR msgrcv ()
88 .\"O system calls are used, respectively, to send messages to,
89 .\"O and receive messages from, a message queue.
90 .\"O The calling process must have write permission on the message queue
91 .\"O in order to send a message, and read permission to receive a message.
92 システムコール
93 .BR msgsnd ()
94
95 .BR msgrcv ()
96 はそれぞれ、メッセージ・キューへのメッセージの送信と、
97 メッセージの受信に使用される。呼び出し元プロセスは、
98 メッセージを送信するためにはメッセージ・キューに対する書き込み許可を、
99 メッセージを受信するためには読み出し許可を持っていなければならない。
100 .PP
101 .\"O The
102 .\"O .I msgp
103 .\"O argument is a pointer to caller-defined structure
104 .\"O of the following general form:
105 呼び出し元プロセスは以下に示す構造体を用意し、この構造体への
106 ポインタを
107 .msgp
108 引き数として渡す。
109 .in +4n
110 .nf
111
112 struct msgbuf {
113     long mtype;       /* message type, must be > 0 */
114     char mtext[1];    /* message data */
115 };
116 .fi
117 .in
118 .PP
119 .\"O The
120 .\"O .I mtext
121 .\"O field is an array (or other structure) whose size is specified by
122 .\"O .IR msgsz ,
123 .\"O a nonnegative integer value.
124 .I mtext
125 フィールドは配列 (または他の構造体) で、その大きさは
126 非負の整数である
127 .I msgsz
128 で指定される。
129 .\"O Messages of zero length (i.e., no
130 .\"O .I mtext
131 .\"O field) are permitted.
132 長さ 0 のメッセージ (つまり
133 .I mtext
134 フィールドがないメッセージ) も認められている。
135 .\"O The
136 .\"O .I mtype
137 .\"O field must have a strictly positive integer value.
138 .\"O This value can be
139 .\"O used by the receiving process for message selection
140 .\"O (see the description of
141 .\"O .BR msgrcv ()
142 .\"O below).
143 .B mtype
144 フィールドは厳密に正の整数でなければならない。
145 この値は、メッセージを受信するプロセスでメッセージを選択するために
146 使用される (下記の
147 .BR msgrcv ()
148 の説明を参照のこと)。
149 .SS msgsnd()
150 .\"O The
151 .\"O .BR msgsnd ()
152 .\"O system call appends a copy of the message pointed to by
153 .\"O .I msgp
154 .\"O to the message queue whose identifier is specified
155 .\"O by
156 .\"O .IR msqid .
157 .BR msgsnd ()
158 システムコールは
159 .I msgp
160 引き数で指定されたメッセージのコピーを
161 .I msqid
162 で指定された識別子を持つメッセージ・キューへ追加する。
163 .PP
164 .\"O If sufficient space is available in the queue,
165 .\"O .BR msgsnd ()
166 .\"O succeeds immediately.
167 キューに十分な空き容量がある場合、
168 .BR msgsnd ()
169 は直ちに成功する。
170 .\"O (The queue capacity is defined by the
171 .\"O .I msg_qbytes
172 .\"O field in the associated data structure for the message queue.
173 .\"O During queue creation this field is initialized to
174 .\"O .B MSGMNB
175 .\"O bytes, but this limit can be modified using
176 .\"O .BR msgctl (2).)
177 (キューの容量は、メッセージ・キューのデータ構造体の
178 .I msg_qbytes
179 フィールドで定義される。
180 キュー作成時にこのフィールドは
181 .B MSGMNB
182 に初期化されるが、この制限は
183 .BR msgctl (2)
184 を使って変更できる。)
185 .\"O If insufficient space is available in the queue, then the default
186 .\"O behavior of
187 .\"O .BR msgsnd ()
188 .\"O is to block until space becomes available.
189 キューに十分な空き容量がない場合、
190 デフォルトでは
191 .BR msgsnd ()
192 は空き容量ができるまで停止 (block) する。
193 .\"O If
194 .\"O .B IPC_NOWAIT
195 .\"O is specified in
196 .\"O .IR msgflg ,
197 .\"O then the call instead fails with the error
198 .\"O .BR EAGAIN .
199 .I msgflg
200
201 .B IPC_NOWAIT
202 が指定された場合は、エラー
203 .B EAGAIN
204 で失敗する。
205
206 .\"O A blocked
207 .\"O .BR msgsnd ()
208 .\"O call may also fail if:
209 停止している
210 .BR msgsnd ()
211 は以下の場合にも失敗する。
212 .IP * 2
213 .\"O the queue is removed,
214 .\"O in which case the system call fails with
215 .\"O .I errno
216 .\"O set to
217 .\"O .BR EIDRM ;
218 .\"O or
219 キューが削除された。
220 この場合、
221 .I errno
222
223 .B EIDRM
224 に設定される。
225 .IP *
226 .\"O a signal is caught, in which case the system call fails
227 .\"O with
228 .\"O .I errno
229 .\"O set to
230 .\"O .BR EINTR ; see
231 .\"O .BR signal (7).
232 シグナルが捕捉された。
233 この場合、
234 .I errno
235
236 .BR EINTR
237 に設定される。
238 .BR signal (7)
239 参照。
240 .\"O .RB ( msgsnd ()
241 .\"O is never automatically restarted after being interrupted by a
242 .\"O signal handler, regardless of the setting of the
243 .\"O .B SA_RESTART
244 .\"O flag when establishing a signal handler.)
245 .RB ( msgsnd ()
246 は、たとえシグナルハンドラの設定時に
247 .B SA_RESTART
248 を指定していたとしても、シグナルハンドラによって割り込まれた後で
249 自動的に再スタートすることは決してない。)
250 .PP
251 .\"O Upon successful completion the message queue data structure is updated
252 .\"O as follows:
253 正常に終了した場合、メッセージ・キューのデータ構造体は以下のように
254 更新される:
255 .IP
256 .\"O .I msg_lspid
257 .\"O is set to the process ID of the calling process.
258 .I msg_lspid
259 には呼び出し元プロセスのプロセス ID が設定される。
260 .IP
261 .\"O .I msg_qnum
262 .\"O is incremented by 1.
263 .I msg_qnum
264 は 1 増加する。
265 .IP
266 .\"O .I msg_stime
267 .\"O is set to the current time.
268 .I msg_stime
269 には現在時刻が設定される。
270 .SS msgrcv()
271 .\"O The
272 .\"O .BR msgrcv ()
273 .\"O system call removes a message from the queue specified by
274 .\"O .I msqid
275 .\"O and places it in the buffer
276 .\"O pointed to by
277 .\"O .IR msgp .
278 .BR msgrcv ()
279 システムコールは
280 .I msqid
281 で指定されたキューからメッセージを削除し、
282 .I msgp
283 で指定されたバッファにそのメッセージを格納する。
284 .PP
285 .\"O The argument
286 .\"O .I msgsz
287 .\"O specifies the maximum size in bytes for the member
288 .\"O .I mtext
289 .\"O of the structure pointed to by the
290 .\"O .I msgp
291 .\"O argument.
292 .I msgsz
293 引き数には
294 .I msgp
295 引き数で指定された構造体の
296 .I mtext
297 メンバーの最大のバイト数を指定する。
298 .\"O If the message text has length greater than
299 .\"O .IR msgsz ,
300 .\"O then the behavior depends on whether
301 .\"O .B MSG_NOERROR
302 .\"O is specified in
303 .\"O .IR msgflg .
304 .\"O If
305 .\"O .B MSG_NOERROR
306 .\"O is specified, then
307 .\"O the message text will be truncated (and the truncated part will be
308 .\"O lost); if
309 .\"O .B MSG_NOERROR
310 .\"O is not specified, then
311 .\"O the message isn't removed from the queue and
312 .\"O the system call fails returning \-1 with
313 .\"O .I errno
314 .\"O set to
315 .\"O .BR E2BIG .
316 メッセージのテキストの長さが
317 .I msgsz
318 より大きい場合の動作は、
319 .I msgflg
320
321 .B MSG_NOERROR
322 が指定されているかどうかで決まる。
323 .B MSG_NOERROR
324 が指定されていれば、メッセージのテキストは切り詰められる
325 (切り捨てられた部分は失われる)。
326 .B MSG_NOERROR
327 が指定されていなければ、メッセージはキューから削除されず、
328 システムコールは \-1 を返して失敗し、
329 .I errno
330
331 .B E2BIG
332 が設定される。
333 .PP
334 .\"O The argument
335 .\"O .I msgtyp
336 .\"O specifies the type of message requested as follows:
337 .I msgtyp
338 引き数には要求するメッセージの型を指定する。
339 型は以下のように指定する:
340 .IP * 2
341 .\"O If
342 .\"O .I msgtyp
343 .\"O is 0,
344 .\"O then the first message in the queue is read.
345 .I msgtyp
346 が 0 ならば、キューの最初にあるメッセージが読み込まれる。
347 .IP *
348 .\"O If
349 .\"O .I msgtyp
350 .\"O is greater than 0,
351 .\"O then the first message in the queue of type
352 .\"O .I msgtyp
353 .\"O is read, unless
354 .\"O .B MSG_EXCEPT
355 .\"O was specified in
356 .\"O .IR msgflg ,
357 .\"O in which case
358 .\"O the first message in the queue of type not equal to
359 .\"O .I msgtyp
360 .\"O will be read.
361 .I msgtyp
362 が 0 より大きい場合、
363 .I msgflg
364
365 .B MSG_EXCEPT
366 が指定されていなければ、
367 .I msgtyp
368 型のキューの最初のメッセージが読み込まれる。
369 .B MSG_EXCEPT
370 が指定された場合は、
371 .I msgtyp
372 型以外のキューの最初のメッセージが読み込まれる。
373 .IP *
374 .\"O If
375 .\"O .I msgtyp
376 .\"O is less than 0,
377 .\"O then the first message in the queue with the lowest type less than or
378 .\"O equal to the absolute value of
379 .\"O .I msgtyp
380 .\"O will be read.
381 .I msgtyp
382 が 0 より小さければ、
383 .I msgtyp
384 の絶対値以下で最も小さい型を持つキューの最初のメッセージが読み込まれる。
385 .PP
386 .\"O The
387 .\"O .I msgflg
388 .\"O argument is a bit mask constructed by ORing together zero or more
389 .\"O of the following flags:
390 .I msgflg
391 引き数には、以下のフラグを任意の数だけ (0個も可)、これらの OR で指定する:
392 .TP
393 .B IPC_NOWAIT
394 .\"O Return immediately if no message of the requested type is in the queue.
395 .\"O The system call fails with
396 .\"O .I errno
397 .\"O set to
398 .\"O .BR ENOMSG .
399 キューに要求された型のメッセージがない場合には直ちに返る。
400 システムコールは失敗し、
401 .I errno
402 には
403 .B ENOMSG
404 が設定される。
405 .TP
406 .B MSG_EXCEPT
407 .\"O Used with
408 .\"O .I msgtyp
409 .\"O greater than 0
410 .\"O to read the first message in the queue with message type that differs
411 .\"O from
412 .\"O .IR msgtyp .
413 0 より大きな
414 .I msgtyp
415 と一緒に使用して、
416 .I msgtyp
417 以外のキューの最初のメッセージを読み込む。
418 .TP
419 .B MSG_NOERROR
420 .\"O To truncate the message text if longer than
421 .\"O .I msgsz
422 .\"O bytes.
423 .I msgsz
424 バイトよりも長かった場合はメッセージのテキストを切り詰める。
425 .PP
426 .\"O If no message of the requested type is available and
427 .\"O .B IPC_NOWAIT
428 .\"O isn't specified in
429 .\"O .IR msgflg ,
430 .\"O the calling process is blocked until one of the following conditions occurs:
431 要求された型のメッセージが存在せず、
432 .I msgflg
433
434 .B IPC_NOWAIT
435 が指定されていなかった場合、呼び出し元プロセスは
436 以下のいずれかの状況になるまで停止 (block) される:
437 .IP * 2
438 .\"O A message of the desired type is placed in the queue.
439 要求している型のメッセージがキューへ入れられた。
440 .IP *
441 .\"O The message queue is removed from the system.
442 .\"O In this case the system call fails with
443 .\"O .I errno
444 .\"O set to
445 .\"O .BR EIDRM .
446 メッセージ・キューがシステムから削除された。
447 この場合、システムコールは失敗し、
448 .I errno
449
450 .B EIDRM
451 が設定される。
452 .IP *
453 .\"O The calling process catches a signal.
454 .\"O In this case the system call fails with
455 .\"O .I errno
456 .\"O set to
457 .\"O .BR EINTR .
458 呼び出し元プロセスがシグナルを捕獲した。
459 この場合、システムコールは失敗し、
460 .I errno
461
462 .B EINTR
463 が設定される。
464 .\"O .RB ( msgrcv ()
465 .\"O is never automatically restarted after being interrupted by a
466 .\"O signal handler, regardless of the setting of the
467 .\"O .B SA_RESTART
468 .\"O flag when establishing a signal handler.)
469 .RB ( msgrcv ()
470 は、たとえシグナルハンドラの設定時に
471 .B SA_RESTART
472 を指定していたとしても、シグナルハンドラによって割り込まれた後で
473 自動的に再スタートすることは決してない。)
474 .PP
475 .\"O Upon successful completion the message queue data structure is updated
476 .\"O as follows:
477 実行に成功した場合、メッセージ・キューのデータ構造体は以下のように
478 更新される:
479 .IP
480 .\"O .I msg_lrpid
481 .\"O is set to the process ID of the calling process.
482 .I msg_lrpid
483 には呼び出し元プロセスのプロセス ID が設定される。
484 .IP
485 .\"O .I msg_qnum
486 .\"O is decremented by 1.
487 .I msg_qnum
488 は 1 減算される。
489 .IP
490 .\"O .I msg_rtime
491 .\"O is set to the current time.
492 .I msg_rtime
493 には現在の時刻が設定される。
494 .\"O .SH "RETURN VALUE"
495 .SH 返り値
496 .\"O On failure both functions return \-1
497 .\"O with
498 .\"O .I errno
499 .\"O indicating the error,
500 .\"O otherwise
501 .\"O .BR msgsnd ()
502 .\"O returns 0
503 .\"O and
504 .\"O .BR msgrcv ()
505 .\"O returns the number of bytes actually copied into the
506 .\"O .I mtext
507 .\"O array.
508 失敗した場合は、どちらの関数も \-1 を返し、エラーを
509 .I errno
510 に表示する。成功した場合、
511 .BR msgsnd ()
512 は 0 を返し、
513 .BR msgrcv ()
514
515 .I mtext
516 配列に実際にコピーしたバイト数を返す。
517 .\"O .SH ERRORS
518 .SH エラー
519 .\"O When
520 .\"O .BR msgsnd ()
521 .\"O fails,
522 .\"O .I errno
523 .\"O will be set to one among the following values:
524 .BR msgsnd ()
525 が失敗した場合、
526 .B errno
527 に以下の値のいずれかが設定される:
528 .TP
529 .B EACCES
530 .\"O The calling process does not have write permission on the message queue,
531 .\"O and does not have the
532 .\"O .B CAP_IPC_OWNER
533 .\"O capability.
534 呼び出し元プロセスにはメッセージ・キューに対する書き込み許可がなく、
535 .B CAP_IPC_OWNER
536 ケーパビリティもない。
537 .TP
538 .B EAGAIN
539 .\"O The message can't be sent due to the
540 .\"O .I msg_qbytes
541 .\"O limit for the queue and
542 .\"O .B IPC_NOWAIT
543 .\"O was specified in
544 .\"O .IR msgflg .
545 .I msg_qbytes
546 がキューの制限を超えていたため、メッセージを送ることができず、かつ
547 .I msgflg
548
549 .B IPC_NOWAIT
550 が指定されていた。
551 .TP
552 .B EFAULT
553 .\"O The address pointed to by
554 .\"O .I msgp
555 .\"O isn't accessible.
556 .I msgp
557 が指しているアドレスがアクセス可能でない。
558 .TP
559 .B EIDRM
560 .\"O The message queue was removed.
561 メッセージ・キューが削除された。
562 .TP
563 .B EINTR
564 .\"O Sleeping on a full message queue condition, the process caught a signal.
565 メッセージ・キューが要求した条件を満たすまで停止している時に、
566 プロセスがシグナルを捕獲した。
567 .TP
568 .B EINVAL
569 .\"O Invalid
570 .\"O .I msqid
571 .\"O value, or nonpositive
572 .\"O .I mtype
573 .\"O value, or
574 .\"O invalid
575 .\"O .I msgsz
576 .\"O value (less than 0 or greater than the system value
577 .\"O .BR MSGMAX ).
578 .I msqid
579 が不適切な値であるか、
580 .I mtype
581 が正の値でないか、
582 .I msgsz
583 が不適切な値 (0 以下か、システムで決まる値
584 .B MSGMAX
585 よりも大きい値) である。
586 .TP
587 .B ENOMEM
588 .\"O The system does not have enough memory to make a copy of the
589 .\"O message pointed to by
590 .\"O .IR msgp .
591 .I msgp
592 が指すメッセージのコピーを作成するのに十分なメモリがシステムに存在しない。
593 .PP
594 .\"O When
595 .\"O .BR msgrcv ()
596 .\"O fails,
597 .\"O .I errno
598 .\"O will be set to one among the following values:
599 .BR msgrcv ()
600 が失敗した場合には
601 .I errno
602 に以下の値のいずれかが設定される:
603 .TP
604 .B E2BIG
605 .\"O The message text length is greater than
606 .\"O .I msgsz
607 .\"O and
608 .\"O .B MSG_NOERROR
609 .\"O isn't specified in
610 .\"O .IR msgflg .
611 メッセージのテキストの長さが
612 .I msgsz
613 よりも大きく、
614 .I msgflg
615
616 .B MSG_NOERROR
617 が設定されていなかった。
618 .TP
619 .B EACCES
620 .\"O The calling process does not have read permission on the message queue,
621 .\"O and does not have the
622 .\"O .B CAP_IPC_OWNER
623 .\"O capability.
624 呼び出し元プロセスにはメッセージ・キューに対する読み込み許可がなく、
625 .B CAP_IPC_OWNER
626 ケーパビリティもない。
627 .TP
628 .B EAGAIN
629 .\"O No message was available in the queue and
630 .\"O .B IPC_NOWAIT
631 .\"O was specified in
632 .\"O .IR msgflg .
633 キューにはメッセージがなく、
634 .I msgflg
635
636 .B IPC_NOWAIT
637 が指定された。
638 .TP
639 .B EFAULT
640 .\"O The address pointed to by
641 .\"O .I msgp
642 .\"O isn't accessible.
643 .I msgp
644 が指しているアドレスがアクセス可能でない。
645 .TP
646 .B EIDRM
647 .\"O While the process was sleeping to receive a message,
648 .\"O the message queue was removed.
649 メッセージを受信するためにプロセスが停止している間に、
650 メッセージ・キューが削除された。
651 .TP
652 .B EINTR
653 .\"O While the process was sleeping to receive a message,
654 .\"O the process caught a signal; see
655 .\"O .BR signal (7).
656 メッセージを受けるためにプロセスが停止している間に、
657 プロセスがシグナルを捕獲した。
658 .BR signal (7)
659 参照。
660 .TP
661 .B EINVAL
662 .\"O .I msgqid
663 .\"O was invalid, or
664 .\"O .I msgsz
665 .\"O was less than 0.
666 .I msgqid
667 が不正か、
668 .I msgsz
669 が 0 より小さい。
670 .TP
671 .B ENOMSG
672 .\"O .B IPC_NOWAIT
673 .\"O was specified in
674 .\"O .I msgflg
675 .\"O and no message of the requested type existed on the message queue.
676 .I msgflg
677
678 .B IPC_NOWAIT
679 が設定されており、
680 メッセージ・キューに要求された型のメッセージが存在しなかった。
681 .\"O .SH "CONFORMING TO"
682 .SH 準拠
683 SVr4, POSIX.1-2001.
684 .\"O .SH NOTES
685 .SH 注意
686 .\"O The
687 .\"O .I msgp
688 .\"O argument is declared as \fIstruct msgbuf *\fP with
689 .\"O libc4, libc5, glibc 2.0, glibc 2.1.
690 .\"O It is declared as \fIvoid *\fP
691 .\"O with glibc 2.2 and later, as required by SUSv2 and SUSv3.
692 .I msgp
693 引き数は、 libc4, libc5, glibc 2.0, glibc 2.1 では
694 \fIstruct msgbuf *\fP と宣言されている。glibc 2.2 以降では、
695 SUSv2 と SUSv3 の要求通り、\fIvoid *\fP と宣言されている。
696
697 .\"O The following limits on message queue resources affect the
698 .\"O .BR msgsnd ()
699 .\"O call:
700 以下は
701 .B msgsnd
702 システムコールに影響するシステム制限である:
703 .TP
704 .B MSGMAX
705 .\"O Maximum size for a message text: 8192 bytes
706 .\"O (on Linux, this limit can be read and modified via
707 .\"O .IR /proc/sys/kernel/msgmax ).
708 メッセージのテキストの最大サイズ: 8192 バイト
709 (Linux では、この制限値は
710 .I /proc/sys/kernel/msgmax
711 経由で読み出したり変更したりできる)。
712 .TP
713 .B MSGMNB
714 .\"O Default maximum size in bytes of a message queue: 16384 bytes
715 .\"O (on Linux, this limit can be read and modified via
716 .\"O .IR /proc/sys/kernel/msgmnb ).
717 .\"O The superuser can increase the size of a message queue beyond
718 .\"O .B MSGMNB
719 .\"O by a
720 .\"O .BR msgctl (2)
721 .\"O system call.
722 バイト単位でのメッセージ・キューのデフォルトの最大サイズ : 16384 バイト。
723 (Linux では、この制限値は
724 .I /proc/sys/kernel/msgmnb
725 経由で読み出したり変更したりできる)。
726 スーパーユーザーは
727 .BR msgctl (2)
728 システムコールでメッセージ・キューのサイズを
729 .B MSGMNB
730 よりも大きい値に増やすことができる。
731 .PP
732 .\"O The implementation has no intrinsic limits for the system wide maximum
733 .\"O number of message headers
734 .\"O .RB ( MSGTQL )
735 .\"O and for the system wide maximum size in bytes of the message pool
736 .\"O .RB ( MSGPOOL ).
737 現在の実装では、システム全体のメッセージ・ヘッダーの最大数
738 .RB ( MSGTQL )
739 と、システム全体のメッセージ・プールの最大バイト数
740 .RB ( MSGPOOL )
741 に関して実装依存の制限はない。
742 .\"O .SH "SEE ALSO"
743 .SH 関連項目
744 .BR msgctl (2),
745 .BR msgget (2),
746 .BR capabilities (7),
747 .BR mq_overview (7),
748 .BR svipc (7)