1 .\" Copyright 1993 Giorgio Ciucci <giorgio@crcc.it>
3 .\" Permission is granted to make and distribute verbatim copies of this
4 .\" manual provflags the copyright notice and this permission notice are
5 .\" preserved on all copies.
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.
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
20 .\" Formatted or processed versions of this manual, if unaccompanied by
21 .\" the source, must acknowledge the copyright and authors of this work.
23 .\" Added correction due to Nick Duffek <nsd@bbc.com>, aeb, 960426
24 .\" Modified Wed Nov 6 04:00:31 1996 by Eric S. Raymond <esr@thyrsus.com>
25 .\" Modified, 8 Jan 2003, Michael Kerrisk, <mtk.manpages@gmail.com>
26 .\" Removed EIDRM from errors - that can't happen...
27 .\" Modified, 27 May 2004, Michael Kerrisk <mtk.manpages@gmail.com>
28 .\" Added notes on capability requirements
29 .\" Modified, 11 Nov 2004, Michael Kerrisk <mtk.manpages@gmail.com>
30 .\" Language and formatting clean-ups
31 .\" Added notes on /proc files
33 .\" Japanese Version Copyright (c) 1997 HANATAKA Shinya
34 .\" all rights reserved.
35 .\" Translated 1997-02-23, HANATAKA Shinya <hanataka@abyss.rim.or.jp>
36 .\" Modified 2003-07-03, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
37 .\" Updated 2005-03-04, Akihiro MOTOKI
39 .\"WORD: message ¥á¥Ã¥»¡¼¥¸
41 .\"WORD: identifier ¼±ÊÌ»Ò
42 .\"WORD: argument °ú¤¿ô
44 .\"WORD: group ¥°¥ë¡¼¥×
46 .\"WORD: initialize ½é´ü²½
47 .\"WORD: effective user ID ¼Â¸ú¥æ¡¼¥¶¡¼ID
48 .\"WORD: effective group ID ¼Â¸ú¥°¥ë¡¼¥×ID
49 .\"WORD: current time ¸½ºß»þ¹ï
50 .\"WORD: destruction ÇË´þ
53 .TH MSGGET 2 2004-05-27 "Linux" "Linux Programmer's Manual"
55 msgget \- ¥á¥Ã¥»¡¼¥¸¡¦¥¥å¡¼¼±Ê̻Ҥò¼èÆÀ¤¹¤ë
58 .B #include <sys/types.h>
59 .B #include <sys/ipc.h>
60 .B #include <sys/msg.h>
62 .BI "int msgget(key_t " key ", int " msgflg );
68 °ú¤¿ô¤ÎÃͤËÂбþ¤¹¤ë¥á¥Ã¥»¡¼¥¸¡¦¥¥å¡¼¤Î¼±Ê̻ҤòÊÖ¤¹¡£
78 ¤ËÂбþ¤¹¤ë¥á¥Ã¥»¡¼¥¸¡¦¥¥å¡¼¤¬Â¸ºß¤»¤º¡¢
82 ¤¬»ØÄꤵ¤ì¤Æ¤¤¤ë¾ì¹ç¡¢
83 ¿·¤·¤¤¥á¥Ã¥»¡¼¥¸¡¦¥¥å¡¼¤¬ºîÀ®¤µ¤ì¤ë¡£
90 ¤ÎξÊý¤¬»ØÄꤵ¤ì¤¿¾ì¹ç¡¢
92 ¤ËÂбþ¤¹¤ë¥á¥Ã¥»¡¼¥¸¡¦¥¥å¡¼¤¬´û¤Ë¸ºß¤¹¤ë¤È¡¢
103 ¤ò»ØÄꤷ¤¿¾ì¹ç¤ÎÆ°ºî¤ÈƱ¤¸¤Ç¤¢¤ë)
105 ¥á¥Ã¥»¡¼¥¸¡¦¥¥å¡¼¤ÎºîÀ®»þ¤Ë¡¢
107 °ú¤¿ô¤Î²¼°Ì 9 ¥Ó¥Ã¥È¤Ï¡¢
108 ¤½¤Î¥á¥Ã¥»¡¼¥¸¡¦¥¥å¡¼¤Î¥¢¥¯¥»¥¹µö²Ä¤ÎÄêµÁ¤È¤·¤Æ»ÈÍѤµ¤ì¤ë¡£
113 ¤ÈƱ¤¸·Á¼°¤ÇƱ¤¸°ÕÌ£¤Ç¤¢¤ë¡£
116 ¥·¥¹¥Æ¥à¡¦¥³¡¼¥ë¤Î¥¢¥¯¥»¥¹µö²Ä¥Ñ¥é¥á¡¼¥¿¤ÈƱ¤¸·Á¼°¤Ç¡¢Æ±¤¸°ÕÌ£¤ò»ý¤Ä¡£
117 (⤷¡¢¼Â¹Ô (execute) µö²Ä¤Ï»ÈÍѤµ¤ì¤Ê¤¤¡£)
119 ¿·µ¬¤Î¥á¥Ã¥»¡¼¥¸¡¦¥¥å¡¼¤òºîÀ®¤¹¤ëºÝ¡¢
121 ¥·¥¹¥Æ¥à¡¦¥³¡¼¥ë¤Ï¥á¥Ã¥»¡¼¥¸¡¦¥¥å¡¼¤Î¥Ç¡¼¥¿¹½Â¤ÂÎ
123 ¤ò°Ê²¼¤Î¤è¤¦¤Ë½é´ü²½¤¹¤ë
132 ¤Ë¸Æ¤Ó½Ð¤·¸µ¥×¥í¥»¥¹¤Î¼Â¸ú (effective) ¥æ¡¼¥¶¡¼ID ¤òÀßÄꤹ¤ë¡£
137 ¤Ë¸Æ¤Ó½Ð¤·¸µ¥×¥í¥»¥¹¤Î¼Â¸ú (effective) ¥°¥ë¡¼¥×ID ¤òÀßÄꤹ¤ë¡£
142 ¤Î²¼°Ì 9 ¥Ó¥Ã¥È¤òÀßÄꤹ¤ë¡£
152 ¤Ë¸½ºß¤Î»þ¹ï¤òÀßÄꤹ¤ë¡£
155 ¤Ë¡¢¥·¥¹¥Æ¥à¤Ç·è¤á¤é¤ì¤¿¥á¥Ã¥»¡¼¥¸¡¦¥¥å¡¼¤ÎºÇÂ祵¥¤¥º
159 ¥á¥Ã¥»¡¼¥¸¡¦¥¥å¡¼¤¬¤¹¤Ç¤Ë¸ºß¤¹¤ë¾ì¹ç¤Ï¡¢¥¢¥¯¥»¥¹µö²Ä¤Î¸¡ºº¤È¡¢
160 ÇË´þ (destruction) ¥Þ¡¼¥¯¤¬¤Ê¤¤¤«¤Î³Îǧ¤¬¹Ô¤ï¤ì¤ë¡£
162 À®¸ù¤·¤¿¾ì¹ç¡¢ÊÖ¤êÃͤϥá¥Ã¥»¡¼¥¸¡¦¥¥å¡¼¼±ÊÌ»Ò (ÈóÉé¤ÎÀ°¿ô) ¤È¤Ê¤ë¡£
163 ¼ºÇÔ¤·¤¿¾ì¹ç¤Ï \-1 ¤¬ÊÖ¤µ¤ì¡¢
165 ¤Ë¤½¤Î¥¨¥é¡¼¤¬¼¨¤µ¤ì¤ë¡£
169 ¤Ë°Ê²¼¤ÎÃͤΤ¤¤º¤ì¤«°ì¤Ä¤¬ÀßÄꤵ¤ì¤ë:
173 ¤ËÂбþ¤¹¤ë¥á¥Ã¥»¡¼¥¸¡¦¥¥å¡¼¤Ï¸ºß¤¹¤ë¤¬¡¢
174 ¸Æ¤Ó½Ð¤·¸µ¥×¥í¥»¥¹¤Ï¤½¤Î¥¥å¡¼¤ËÂФ¹¤ë¥¢¥¯¥»¥¹µö²Ä¤¬¤Ê¤¯¡¢
176 ¥±¡¼¥Ñ¥Ó¥ê¥Æ¥£¤â»ý¤Ã¤Æ¤¤¤Ê¤¤¡£
180 ¤ËÂбþ¤¹¤ë¥á¥Ã¥»¡¼¥¸¡¦¥¥å¡¼¤¬Â¸ºß¤·¡¢
190 ¤ËÂбþ¤¹¤ë¥á¥Ã¥»¡¼¥¸¡¦¥¥å¡¼¤¬Â¸ºß¤»¤º¡¢
194 ¤¬»ØÄꤵ¤ì¤Æ¤¤¤Ê¤«¤Ã¤¿¡£
197 ¥á¥Ã¥»¡¼¥¸¡¦¥¥å¡¼¤òºîÀ®¤·¤è¤¦¤È¤·¤¿¤¬¡¢¿·¤·¤¤¥Ç¡¼¥¿¹½Â¤ÂΤòºîÀ®
198 ¤¹¤ë¤Î¤Ë½½Ê¬¤Ê¥á¥â¥ê¤¬¥·¥¹¥Æ¥à¤Ë¸ºß¤·¤Ê¤¤¡£
201 ¥á¥Ã¥»¡¼¥¸¡¦¥¥å¡¼¤òºîÀ®¤·¤è¤¦¤È¤·¤¿¤¬¡¢ºîÀ®¤¹¤ë¤È
202 ¥·¥¹¥Æ¥àÁ´ÂΤΥá¥Ã¥»¡¼¥¸¡¦¥¥å¡¼¿ô¤ÎºÇÂçÃÍ
214 ¤È¤·¤Æ»ÈÍѤµ¤ì¤¿¾ì¹ç¡¢
218 ¤Î²¼°Ì 9 ¥Ó¥Ã¥È°Ê³°¤ÎÁ´¤Æ¤ò̵»ë¤·¤Æ
219 (À®¸ù¤·¤¿¾ì¹ç¤Ï) ¿·¤·¤¤¥á¥Ã¥»¡¼¥¸¡¦¥¥å¡¼¤òºîÀ®¤¹¤ë¡£
222 ¥·¥¹¥Æ¥à¥³¡¼¥ë¤Ë±Æ¶Á¤òµÚ¤Ü¤¹¥á¥Ã¥»¡¼¥¸¡¦¥¥å¡¼¤Î»ñ¸»¤Î
223 ¥·¥¹¥Æ¥à¤È¤·¤Æ¤ÎÀ©¸Â¤ò°Ê²¼¤Ë¼¨¤¹:
226 ¥·¥¹¥Æ¥àÁ´ÂΤΥá¥Ã¥»¡¼¥¸¡¦¥¥å¡¼¿ô¤ÎºÇÂçÃÍ: Êý¿Ë°Í¸
227 (Linux ¤Ç¤Ï¡¢¤³¤ÎÀ©¸ÂÃͤÏ
228 .I /proc/sys/kernel/msgmni
229 ·Ðͳ¤Ç»²¾È¤·¤¿¤ê¡¢Êѹ¹¤·¤¿¤ê¤Ç¤¤ë)¡£
231 Linux 2.3.20 ¤Þ¤Ç¤Ï¡¢ºï½ü¤¬Í½Äꤵ¤ì¤Æ¤¤¤ë¥á¥Ã¥»¡¼¥¸¡¦¥¥å¡¼¤ËÂФ·¤Æ
235 ¤¬¥¨¥é¡¼¤È¤·¤ÆÊÖ¤µ¤ì¤ë¤è¤¦¤Ë¤Ê¤Ã¤Æ¤¤¤¿¡£
238 ¤È¤¤¤¦Ì¾Á°¤òÁª¤ó¤À¤Î¤Ï¤ª¤½¤é¤¯¼ºÇԤǤ¢¤í¤¦¡£
240 ¤ÎÊý¤¬¤è¤êÌÀ³Î¤Ë¤½¤Îµ¡Ç½¤òɽ¤·¤Æ¤¤¤ë¤À¤í¤¦¡£
246 .BR capabilities (7),