.\" $NetBSD: msgget. 2, v 1.1 1995/10/16 23:49:19 jtc Exp $ .\" .\" Copyright (c) 1995 Frank van der Linden .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" 3. All advertising materials mentioning features or use of this software .\" must display the following acknowledgement: .\" This product includes software developed for the NetBSD Project .\" by Frank van der Linden .\" 4. The name of the author may not be used to endorse or promote products .\" derived from this software without specific prior written permission .\" .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. .\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" %FreeBSD: src/lib/libc/gen/msgget. 3, v 1.7. 2.4 2001/12/14 18:33:51 ru Exp % .\" .\"/ .\" $FreeBSD: doc/ja_JP.eucJP/man/man3/msgget. 3, v 1.5 2002/11/03 06:38:28 horikawa Exp $ .Dd August 17, 1995 .Dt MSGGET 3 .Os .Sh ¸íĪ .Nm msgget .Nd ¸Þ½ÃÁö Å¥ÀÇ Ãëµæ .Sh ÇÁ·Î±×·¥ ¶óÀ̺귯¸® .Lb libc .Sh ¼­½Ä .In sys/types.h .In sys/ipc.h .In sys/msg.h .Ft int .Fn msgget "key_t key" "int msgflg" .Sh ÇØ¼³ .Fn msgget (Àº)´Â, .Fa key ¿¡ °ü·ÃÇÏ´Â ¸Þ½ÃÁö Å¥ ID ¸¦ µÇµ¹¸³´Ï´Ù. ¸Þ½ÃÁö Å¥ ID ´Â, 0 º¸´Ù Å« ÀÏÀÇÀûÀÎ Á¤¼öÀÔ´Ï´Ù. .Pp ¸Þ½ÃÁö Å¥´Â, .Fa key ÇÏÁö¸¸ .Dv IPC_PRIVATE (¿Í)°ú µ¿ÀÏÇÑ °æ¿ì, ¶Ç´Â .Fa key ¿¡ °ü·ÃÇÏ´Â ¸Þ½ÃÁö Å¥ ID °¡ Á¸ÀçÇÏÁö ¾Ê°í, ÇÑÆí, .Dv IPC_CREAT ºñÆ®°¡ .Fa msgflg ±×¸®°í ¼³Á¤µÇ¾î ÀÖ´Â °æ¿ì¿¡ ÀÛ¼ºµË´Ï´Ù. .Pp »õ·Î¿î ¸Þ½ÃÁö Å¥°¡ ÀÛ¼ºµÇ¾úÀ» °æ¿ì, °ü·ÃÇÏ´Â µ¥ÀÌÅÍ ±¸Á¶ ( .Fa msqid_ds ±¸Á¶Ã¼. .Xr msgctl 3 ÂüÁ¶)´Â, ÀÌÇÏ¿Í °°ÀÌ ÃʱâÈ­µË´Ï´Ù. .Bl -bullet .It .Va msg_perm.cuid (¿Í)°ú .Va msg_perm.uid (Àº)´Â, È£Ãâ ÇÁ·Î¼¼½ºÀÇ ½ÇÈ¿ À¯Àú ID ·Î ¼³Á¤µË´Ï´Ù. .It .Va msg_perm.gid (¿Í)°ú .Va msg_perm.cgid (Àº)´Â, È£Ãâ ÇÁ·Î¼¼½ºÀÇ ½ÇÈ¿ ±×·ì ID ·Î ¼³Á¤µË´Ï´Ù. .It .Va msg_perm.mode (Àº)´Â, .Fa msgflg ÀÇ ÇÏÀ§ 9 ºñÆ®°¡ ¼³Á¤µË´Ï´Ù. .It .Va msg_cbytes , .Va msg_qnum , .Va msg_lspid , .Va msg_lrpid , .Va msg_rtime , .Va msg_stime ¿¡´Â 0 ÀÌ ¼³Á¤µË´Ï´Ù. .It .Va msg_qbytes (Àº)´Â, Å¥ÀÇ ¹ÙÀÌÆ®¼ö .Pf ( Dv MSGMNB ) ¿¡ ´ëÇÑ ½Ã½ºÅÛÀÇ ÃÖ´ëÄ¡°¡ ¼³Á¤µË´Ï´Ù. .It .Va msg_ctime (Àº)´Â, ÇöÀçÀÇ ½Ã°¢À¸·Î ¼³Á¤µË´Ï´Ù. .El .Sh ¹Ýȯ°ª ¹®Á¦ ¾ø°Ô Á¾·áÇϸé(ÀÚ), Á¤ÀÇ ¸Þ½ÃÁö Å¥ ID °¡ µÇµ¹·ÁÁý´Ï´Ù. ¹®Á¦ ¾ø°í Á¾·áÇÏÁö ¾ÊÀ¸¸é -1 ÀÌ µÇµ¹·ÁÁ® ±Û·Î¹ú º¯¼ö .Va errno ÇÏÁö¸¸ ±× ¿¡·¯¸¦ ³ªÅ¸³»µµ·Ï(µíÀÌ) ¼³Á¤µË´Ï´Ù. .Sh ¿¡·¯ .Bl -tag -width Er .It Bq Er EACESS ¸Þ½ÃÁö Å¥°¡ .Fa key (¿Í)°ú ¹ú½á °ü·ÃÇϰí ÀÖ½À´Ï´Ù¸¸, ¼Òȯ Ãø¿¡ ¾×¼¼½º±ÇÀÌ ¾ø½À´Ï´Ù. .It Bq Er EEXIST .Dv IPC_CREAT (¿Í)°ú .Dv IPC_EXCL ÀÇ ¾çÂÊ ¸ðµÎ°¡ .Fa msgflg ±×¸®°í ¼³Á¤µÇ¾î ÀÖ¾î ¸Þ½ÃÁö Å¥°¡ .Fa key (¿Í)°ú ¹ú½á °ü·ÃÇϰí ÀÖ½À´Ï´Ù. .It Bq Er ENOSPC ¸Þ½ÃÁö Å¥ÀÇ ¼ö¿¡ °üÇÑ ½Ã½ºÅÛ Á¦ÇÑ¿¡ À̸£°í ÀÖ±â (À§ÇØ)¶§¹®¿¡, »õ·Î¿î ¸Þ½ÃÁö Å¥¸¦ ÀÛ¼ºÇÒ ¼ö ¾ø½À´Ï´Ù. .It Bq Er ENOENT .Fa msgflg ¿¡ .Dv IPC_CREAT ÇÏÁö¸¸ ¼³Á¤µÇ¾î ÀÖÁö ¾ÊÀº »óȲÀ¸·Î, .Fa key ¿¡ °ü·ÃÇÏ´Â ¸Þ½ÃÁö Å¥°¡ ¹ß°ßµÇÁö ¾Ê½À´Ï´Ù. .El .Sh °ü·Ã Ç׸ñ .Xr msgctl 3 , .Xr msgrcv 3 , .Xr msgsnd 3 .Pp .Sh ¿ª»ç ¸Þ½ÃÁö Å¥´Â, .At V ÀÇ ÃÖÃÊÀÇ ¸±¸®½º¿¡ Ãß°¡µÇ¾ú½À´Ï´Ù. .\"kuma 1999-11-12