OSDN Git Service

(split) Convert release and draft pages to UTF-8.
[linuxjm/LDP_man-pages.git] / draft / man2 / shmop.2
index 3bf7171..43107cb 100644 (file)
 .\" Updated 2005-12-05, Akihiro MOTOKI, Catch up to LDP man-pages 2.16
 .\" Updated 2006-04-14, Akihiro MOTOKI, Catch up to LDP man-pages 2.29
 .\"
-.\"WORD:       shared memory           ¶¦Í­¥á¥â¥ê
-.\"WORD:       segment                 ¥»¥°¥á¥ó¥È
-.\"WORD:       super-user              ¥¹¡¼¥Ñ¡¼¡¦¥æ¡¼¥¶¡¼
-.\"WORD:       detach                  ʬΥ
-.\"WORD:       attach                  ÉÕ²Ã
-.\"WORD:       member                  ¥á¥ó¥Ð¡¼
-.\"WORD:       implement               ¼ÂÁõ
-.\"WORD:       page aligned            ¥Ú¡¼¥¸¶­³¦¤Ë¹ç¤Ã¤¿
-.\"WORD:       unaligned               ¶­³¦°ãÈ¿
-.\"WORD:       descriptor              ¥Ç¥£¥¹¥¯¥ê¥×¥¿¡¼
-.\"WORD:       parameter               ¥Ñ¥é¥á¡¼¥¿¡¼
+.\"WORD:       shared memory           共有メモリ
+.\"WORD:       segment                 セグメント
+.\"WORD:       super-user              ã\82¹ã\83¼ã\83\91ã\83¼ã\83»ã\83¦ã\83¼ã\82¶ã\83¼
+.\"WORD:       detach                  分離
+.\"WORD:       attach                  付加
+.\"WORD:       member                  ã\83¡ã\83³ã\83\90ã\83¼
+.\"WORD:       implement               実装
+.\"WORD:       page aligned            ページ境界に合った
+.\"WORD:       unaligned               境界違反
+.\"WORD:       descriptor              ã\83\87ã\82£ã\82¹ã\82¯ã\83ªã\83\97ã\82¿ã\83¼
+.\"WORD:       parameter               ã\83\91ã\83©ã\83¡ã\83¼ã\82¿ã\83¼
 .\"
 .TH SHMOP 2 2008-06-03 "Linux" "Linux Programmer's Manual"
 .\"O .SH NAME
-.SH Ì¾Á°
+.SH 名前
 .\"O shmop, shmat, shmdt \- shared memory operations
-shmat, shmdt \- ¶¦Í­¥á¥â¥ê (shared memory) ¤ÎÁàºî
+shmat, shmdt \- 共有メモリ (shared memory) の操作
 .\"O .SH SYNOPSIS
-.SH ½ñ¼°
+.SH 書式
 .nf
 .B #include <sys/types.h>
 .B #include <sys/shm.h>
@@ -74,22 +74,22 @@ shmat, shmdt \- 
 .BI "int shmdt(const void *" shmaddr );
 .fi
 .\"O .SH DESCRIPTION
-.SH ÀâÌÀ
+.SH 説明
 .\"O .BR shmat ()
 .\"O attaches the shared memory segment identified by
 .\"O .I shmid
 .\"O to the address space of the calling process.
 .BR shmat ()
-¤Ï
+は
 .I shmid
-¤Ç»ØÄꤵ¤ì¤¿¶¦Í­¥á¥â¥ê¡¦¥»¥°¥á¥ó¥È (shared memory segment) ¤ò
-¥³¡¼¥ë¤·¤¿¥×¥í¥»¥¹¤Î¥¢¥É¥ì¥¹¶õ´Ö¤ËÉղà(attach) ¤¹¤ë¡£
+で指定された共有メモリ・セグメント (shared memory segment) を
+コールしたプロセスのアドレス空間に付加 (attach) する。
 .\"O The attaching address is specified by
 .\"O .I shmaddr
 .\"O with one of the following criteria:
-Éղ乤륢¥É¥ì¥¹¤Ï
+付加するアドレスは
 .I shmaddr
-¤Ë°Ê²¼¤Î¤É¤ì¤«¤Î·Á¼°¤Ç»ØÄꤹ¤ë:
+に以下のどれかの形式で指定する:
 .LP
 .\"O If
 .\"O .I shmaddr
@@ -97,8 +97,8 @@ shmat, shmdt \- 
 .\"O the system chooses a suitable (unused) address at which to attach
 .\"O the segment.
 .I shmaddr
-¤¬ NULL ¤Ê¤é¤Ð¡¢¥·¥¹¥Æ¥à¤Ï¥»¥°¥á¥ó¥È¤òÉղ乤뤿¤á¤Î
-ŬÀڤʠ(»ÈÍѤµ¤ì¤Æ¤¤¤Ê¤¤) ¥¢¥É¥ì¥¹¤òÁªÂò¤¹¤ë¡£
+が NULL ならば、システムはセグメントを付加するための
+適切な (使用されていない) アドレスを選択する。
 .LP
 .\"O If
 .\"O .I shmaddr
@@ -112,21 +112,21 @@ shmat, shmdt \- 
 .\"O rounded down to the nearest multiple of
 .\"O .BR SHMLBA .
 .I shmaddr
-¤¬ NULL ¤Ç¤Ê¤¯
+が NULL でなく
 .B SHM_RND
-¤¬
+が
 .I shmflg
-¤Ë»ØÄꤵ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ï¡¢
+に指定されている場合は、
 .I shmaddr
-¤ò
+を
 .B SHMLBA
-¤ÎÇÜ¿ô¤Ø¤ÈÀÚ¤ê¼Î¤Æ¤¿ (rounding down) ¤Î¤ÈÅù¤·¤¤¥¢¥É¥ì¥¹¤ØÉղ乤롣
+の倍数へと切り捨てた (rounding down) のと等しいアドレスへ付加する。
 .\"O Otherwise
 .\"O .I shmaddr
 .\"O must be a page-aligned address at which the attach occurs.
-¤½¤Î¾¤Î¾ì¹ç¤Ï
+その他の場合は
 .I shmaddr
-¤ÏÉղäò¹Ô¤Ê¤¦¥¢¥É¥ì¥¹¤Ç¡¢¥Ú¡¼¥¸¶­³¦¤ò»Ø¤·¤Æ¤¤¤ëɬÍפ¬¤¢¤ë¡£
+は付加を行なうアドレスで、ページ境界を指している必要がある。
 .PP
 .\"O If
 .\"O .B SHM_RDONLY
@@ -135,17 +135,17 @@ shmat, shmdt \- 
 .\"O the segment is attached for reading and the process must have
 .\"O read permission for the segment.
 .B SHM_RDONLY
-¤¬
+が
 .I shmflg
-¤Ë»ØÄꤵ¤ì¤Æ¤¤¤¿¾ì¹ç¤Ï¡¢
-¥»¥°¥á¥ó¥È¤ÏÆɤ߹þ¤ßÀìÍѤËÉղ䵤졢¥×¥í¥»¥¹¤Ï¤½¤Î¥»¥°¥á¥ó¥È¤Ø¤Î
-Æɤ߹þ¤ßµö²Ä¤ò»ý¤¿¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£
+に指定されていた場合は、
+セグメントは読み込み専用に付加され、プロセスはそのセグメントへの
+読み込み許可を持たなければならない。
 .\"O Otherwise the segment is attached for read and write
 .\"O and the process must have read and write permission for the segment.
 .\"O There is no notion of a write-only shared memory segment.
-¤½¤¦¤Ç¤Ê¤±¤ì¤Ð¤½¤Î¥»¥°¥á¥ó¥È¤ÏÆɤ߹þ¤ß¤È½ñ¤­¹þ¤ß¤Î¤¿¤á¤ËÉղ䵤졢
-¥×¥í¥»¥¹¤Ï¤½¤Î¥»¥°¥á¥ó¥È¤ËÆɤ߹þ¤ß¤È½ñ¤­¹þ¤ß¤Îµö²Ä¤ò»ý¤ÄɬÍפ¬¤¢¤ë¡£
-½ñ¤­¹þ¤ßÀìÍѤζ¦Í­¥á¥â¥ê¡¦¥»¥°¥á¥ó¥È¤È¤¤¤¦³µÇ°¤Ï¸ºß¤·¤Ê¤¤¡£
+そうでなければそのセグメントは読み込みと書き込みのために付加され、
+プロセスはそのセグメントに読み込みと書き込みの許可を持つ必要がある。
+書き込み専用の共有メモリ・セグメントという概念は存在しない。
 .PP
 .\"O The (Linux-specific)
 .\"O .B SHM_REMAP
@@ -155,40 +155,40 @@ shmat, shmdt \- 
 .\"O any existing mapping in the range starting at
 .\"O .I shmaddr
 .\"O and continuing for the size of the segment.
-(Linux ÆÃÍ­¤Î)
+(Linux 特有の)
 .B SHM_REMAP
-¥Õ¥é¥°¤¬
+フラグが
 .I shmflg
-¤Ë»ØÄꤵ¤ì¤¿¾ì¹ç¤Ï¡¢
-¥»¥°¥á¥ó¥È¤Î¥Þ¥Ã¥Ô¥ó¥°¤ò´û¸¤Î¥Þ¥Ã¥Ô¥ó¥°¤ËÃÖ¤­´¹¤¨¤ë¡£
-¥Þ¥Ã¥Ô¥ó¥°¤ÎÈϰϤϡ¢
+に指定された場合は、
+セグメントのマッピングを既存のマッピングに置き換える。
+マッピングの範囲は、
 .I shmaddr
-¤«¤é»Ï¤Þ¤ê¥»¥°¥á¥ó¥È¤Î¥µ¥¤¥ºÊ¬¤À¤±¤¢¤ë
+から始まりセグメントのサイズ分だけある
 .\"O (Normally an
 .\"O .B EINVAL
 .\"O error would result if a mapping already exists in this address range.)
 .\"O In this case,
 .\"O .I shmaddr
 .\"O must not be NULL.
-(Ä̾ï
+(通常
 .B EINVAL
-¥¨¥é¡¼¤Ï¡¢¤³¤Î¥¢¥É¥ì¥¹ÈϰϤ˥ޥåԥ󥰤¬´û¤Ë¸ºß¤¹¤ë¤¿¤á¤Ëµ¯¤ë)¡£
-¤³¤Î¥Õ¥é¥°¤ò»ØÄꤹ¤ë¾ì¹ç¤Ï¡¢
+エラーは、このアドレス範囲にマッピングが既に存在するために起る)。
+このフラグを指定する場合は、
 .I shmaddr
-¤¬ NULL ¤Ç¤¢¤Ã¤Æ¤Ï¤Ê¤é¤Ê¤¤¡£
+が NULL であってはならない。
 .PP
 .\"O The
 .\"O .BR brk (2)
 .\"O value of the calling process is not altered by the attach.
-¸Æ¤Ó½Ð¤·¤¿¥×¥í¥»¥¹¤Î
+呼び出したプロセスの
 .BR brk (2)
-¤ÎÃͤÏÉղäˤè¤Ã¤ÆÊѲ½¤·¤Ê¤¤¡£
+の値は付加によって変化しない。
 .\"O The segment will automatically be detached at process exit.
-¤½¤Î¥»¥°¥á¥ó¥È¤Ï¥×¥í¥»¥¹¤¬½ªÎ» (exit) ¤·¤¿¤é¼«Æ°Åª¤ËʬΥ (detach) ¤µ¤ì¤ë¡£
+そのセグメントはプロセスが終了 (exit) したら自動的に分離 (detach) される。
 .\"O The same segment may be attached as a read and as a read-write
 .\"O one, and more than once, in the process's address space.
-Ʊ¤¸¥»¥°¥á¥ó¥È¤ò¥×¥í¥»¥¹¤Î¥¢¥É¥ì¥¹¶õ´Ö¤Ë¡¢Æɤ߹þ¤ßÀìÍѤª¤è¤ÓÆɤ߽ñ¤­Î¾ÍÑ
-¤È¤·¤ÆÉղäǤ­¡¢¤Þ¤¿Ê£¿ô²óÉղ乤뤳¤È¤â¤Ç¤­¤ë¡£
+同じセグメントをプロセスのアドレス空間に、読み込み専用および読み書き両用
+として付加でき、また複数回付加することもできる。
 .PP
 .\"O A successful
 .\"O .BR shmat ()
@@ -197,101 +197,101 @@ shmat, shmdt \- 
 .\"O structure (see
 .\"O .BR shmctl (2))
 .\"O associated with the shared memory segment as follows:
-À®¸ù¤·¤¿
+成功した
 .BR shmat ()
-¥³¡¼¥ë¤Ï¶¦Í­¥á¥â¥ê¡¦¥»¥°¥á¥ó¥È¤Ë´ØÏ¢¤¹¤ë
+コールは共有メモリ・セグメントに関連する
 .I shmid_ds
-¹½Â¤ÂÎ
+構造体
 .RB ( shmctl (2)
-¤ò»²¾È) ¤Î¥á¥ó¥Ð¡¼¤ò°Ê²¼¤Î¤è¤¦¤Ë¹¹¿·¤¹¤ë:
+を参照) のメンバーを以下のように更新する:
 .IP
 .\"O .I shm_atime
 .\"O is set to the current time.
 .I shm_atime
-¤Ë¤Ï¸½ºß¤Î»þ¹ï¤òÀßÄꤹ¤ë¡£
+には現在の時刻を設定する。
 .IP
 .\"O .I shm_lpid
 .\"O is set to the process-ID of the calling process.
 .I shm_lpid
-¤Ë¤Ï¸Æ¤Ó½Ð¤·¤¿¥×¥í¥»¥¹¤Î¥×¥í¥»¥¹ ID ¤òÀßÄꤹ¤ë¡£
+には呼び出したプロセスのプロセス ID を設定する。
 .IP
 .\"O .I shm_nattch
 .\"O is incremented by one.
 .I shm_nattch
-¤ò 1 Áý²Ã¤µ¤»¤ë¡£
+を 1 増加させる。
 .PP
 .\"O .BR shmdt ()
 .\"O detaches the shared memory segment located at the address specified by
 .\"O .I shmaddr
 .\"O from the address space of the calling process.
 .BR shmdt ()
-¤Ï¸Æ¤Ó½Ð¤·¤¿¥×¥í¥»¥¹¤Î¥¢¥É¥ì¥¹¶õ´Ö¤«¤é
+は呼び出したプロセスのアドレス空間から
 .I shmaddr
-¤Ç»ØÄꤵ¤ì¤¿¥¢¥É¥ì¥¹¤ËÇÛÃÖ¤µ¤ì¤¿¶¦Í­¥á¥â¥ê¡¦¥»¥°¥á¥ó¥È¤òʬΥ (detach) ¤¹¤ë¡£
+で指定されたアドレスに配置された共有メモリ・セグメントを分離 (detach) する。
 .\"O The to-be-detached segment must be currently
 .\"O attached with
 .\"O .I shmaddr
 .\"O equal to the value returned by the attaching
 .\"O .BR shmat ()
 .\"O call.
-ʬΥ¤¹¤ë¶¦Í­¥á¥â¥ê¡¦¥»¥°¥á¥ó¥È¤Ï¡¢¸½ºß
+分離する共有メモリ・セグメントは、現在
 .I shmaddr
-¤ËÉղ䵤ì¤Æ¤¤¤ë¤â¤Î¤Ç¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£
+に付加されているものでなければならない。
 .I shmaddr
-¤Ï¡¢¤½¤ì¤òÉղä·¤¿»þ¤Ë
+は、それを付加した時に
 .BR shmat ()
-¤¬ÊÖ¤·¤¿ÃͤËÅù¤·¤¯¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£
+が返した値に等しくなければならない。
 .PP
 .\"O On a successful
 .\"O .BR shmdt ()
 .\"O call the system updates the members of the
 .\"O .I shmid_ds
 .\"O structure associated with the shared memory segment as follows:
-À®¸ù¤·¤¿
+成功した
 .BR shmdt ()
-¥³¡¼¥ë¤Ï¤½¤Î¶¦Í­¥á¥â¥ê¡¦¥»¥°¥á¥ó¥È¤Ë´ØÏ¢¤¹¤ë
+コールはその共有メモリ・セグメントに関連する
 .I shmid_ds
-¹½Â¤ÂΤΥá¥ó¥Ð¡¼¤ò°Ê²¼¤Î¤è¤¦¤Ë¹¹¿·¤¹¤ë:
+構造体のメンバーを以下のように更新する:
 .IP
 .\"O .I shm_dtime
 .\"O is set to the current time.
 .I shm_dtime
-¤Ë¤Ï¸½ºß¤Î»þ¹ï¤¬ÀßÄꤵ¤ì¤ë¡£
+には現在の時刻が設定される。
 .IP
 .\"O .I shm_lpid
 .\"O is set to the process-ID of the calling process.
 .I shm_lpid
-¤Ë¤Ï¸Æ¤Ó½Ð¤·¤¿¥×¥í¥»¥¹¤Î¥×¥í¥»¥¹ ID ¤¬ÀßÄꤵ¤ì¤ë¡£
+には呼び出したプロセスのプロセス ID が設定される。
 .IP
 .\"O .I shm_nattch
 .\"O is decremented by one.
 .I shm_nattch
-¤ò 1 ¸º¾¯¤µ¤»¤ë¡£
+を 1 減少させる。
 .\"O If it becomes 0 and the segment is marked for deletion,
 .\"O the segment is deleted.
-¤â¤· 0 ¤Ë¤Ê¤ê¡¢ºï½ü¥Þ¡¼¥¯¤¬¤¢¤Ã¤¿¾ì¹ç¤Ï
-¤½¤Î¥»¥°¥á¥ó¥È¤Ïºï½ü¤µ¤ì¤ë¡£
+もし 0 になり、削除マークがあった場合は
+そのセグメントは削除される。
 .PP
 .\"O After a
 .\"O .BR fork (2)
 .\"O the child inherits the attached shared memory segments.
 .BR fork (2)
-¤·¤¿¸å¡¢»Ò¥×¥í¥»¥¹¤ÏÉղ䵤줿¶¦Í­¥á¥â¥ê¡¦¥»¥°¥á¥ó¥È¤ò·Ñ¾µ¤¹¤ë¡£
+した後、子プロセスは付加された共有メモリ・セグメントを継承する。
 
 .\"O After an
 .\"O .BR exec (2)
 .\"O all attached shared memory segments are detached from the process.
 .BR exec (2)
-¤·¤¿¸å¡¢Á´¤Æ¤ÎÉղ䵤줿¶¦Í­¥á¥â¥ê¡¦¥»¥°¥á¥ó¥È¤Ï¥×¥í¥»¥¹¤«¤éʬΥ¤µ¤ì¤ë¡£
+した後、全ての付加された共有メモリ・セグメントはプロセスから分離される。
 
 .\"O Upon
 .\"O .BR exit (2)
 .\"O all attached shared memory segments are detached from the process.
 .BR exit (2)
-¤Ë¤ª¤¤¤Æ¡¢Á´¤Æ¤ÎÉղ䵤줿¶¦Í­¥á¥â¥ê¡¦¥»¥°¥á¥ó¥È¤Ï¥×¥í¥»¥¹¤«¤éʬΥ¤µ¤ì¤ë¡£
+において、全ての付加された共有メモリ・セグメントはプロセスから分離される。
 .PP
 .\"O .SH "RETURN VALUE"
-.SH ÊÖ¤êÃÍ
+.SH 返り値
 .\"O On success
 .\"O .BR shmat ()
 .\"O returns the address of the attached shared memory segment; on error
@@ -300,13 +300,13 @@ shmat, shmdt \- 
 .\"O .I errno
 .\"O is set to indicate the cause of the error.
 .BR shmat ()
-¤Ï¡¢À®¸ù¤·¤¿¾ì¹ç¡¢
-Éղ䵤줿¶¦Í­¥á¥â¥ê¡¦¥»¥°¥á¥ó¥È¤Î¥¢¥É¥ì¥¹¤òÊÖ¤¹¡£
-¥¨¥é¡¼¤Î¾ì¹ç¡¢
+は、成功した場合、
+付加された共有メモリ・セグメントのアドレスを返す。
+エラーの場合、
 .I (void\ *)\ \-1
-¤òÊÖ¤·¡¢
+を返し、
 .I errno
-¤Ë¥¨¥é¡¼¤Î¸¶°ø¤ò¼¨¤¹ÃͤòÀßÄꤹ¤ë¡£
+にエラーの原因を示す値を設定する。
 
 .\"O On success
 .\"O .BR shmdt ()
@@ -314,30 +314,30 @@ shmat, shmdt \- 
 .\"O .I errno
 .\"O is set to indicate the cause of the error.
 .BR shmdt ()
-¤Ï¡¢À®¸ù¤¹¤ë¤È 0 ¤òÊÖ¤¹¡£
-¥¨¥é¡¼¤Î¾ì¹ç¡¢\-1 ¤òÊÖ¤·¡¢
+は、成功すると 0 を返す。
+エラーの場合、\-1 を返し、
 .I errno
-¤Ë¥¨¥é¡¼¤Î¸¶°ø¤ò¼¨¤¹ÃͤòÀßÄꤹ¤ë¡£
+にエラーの原因を示す値を設定する。
 .\"O .SH ERRORS
-.SH ¥¨¥é¡¼
+.SH ã\82¨ã\83©ã\83¼
 .\"O When
 .\"O .BR shmat ()
 .\"O fails,
 .\"O .I errno
 .\"O is set to one of the following:
 .BR shmat ()
-¤¬¼ºÇÔ¤·¤¿¾ì¹ç¡¢
+が失敗した場合、
 .I errno
-¤Ë°Ê²¼¤ÎÃͤΤɤ줫¤òÀßÄꤷ¤ÆÊÖ¤¹:
+に以下の値のどれかを設定して返す:
 .TP
 .B EACCES
 .\"O The calling process does not have the required permissions for
 .\"O the requested attach type, and does not have the
 .\"O .B CAP_IPC_OWNER
 .\"O capability.
-¸Æ¤Ó½Ð¤·¤¿¥×¥í¥»¥¹¤ËÍ׵ᤵ¤ì¤¿¼ïÎà¤ÎÉղäËɬÍפʵö²Ä¤¬¤Ê¤¯¡¢
+呼び出したプロセスに要求された種類の付加に必要な許可がなく、
 .B CAP_IPC_OWNER
-¥±¡¼¥Ñ¥Ó¥ê¥Æ¥£ (capability) ¤¬¤Ê¤¤¡£
+ケーパビリティ (capability) がない。
 .TP
 .B EINVAL
 .\"O Invalid
@@ -348,28 +348,28 @@ shmat, shmdt \- 
 .\"O value, or can't attach segment at
 .\"O .IR shmaddr ,
 .I shmid
-¤ÎÃͤ¬ÉÔÀµ¤Ç¤¢¤ë¡£
+の値が不正である。
 .I shmaddr
-¤ÎÃͤ¬¶­³¦°ãÈ¿ (unaligned) (¤Ä¤Þ¤ê¡¢¥Ú¡¼¥¸¶­³¦¤Ë¹ç¤Ã¤Æ¤ª¤é¤º¡¢
-\fBSHM_RND\fP ¤¬»ØÄꤵ¤ì¤Æ¤¤¤Ê¤¤) ¤Þ¤¿¤Ï
-¤¬ÉÔÀµ¤Ç¤¢¤ë¡£
+の値が境界違反 (unaligned) (つまり、ページ境界に合っておらず、
+\fBSHM_RND\fP が指定されていない) または
+が不正である。
 .I shmaddr
-¤Ø¤Î¥»¥°¥á¥ó¥È¤ÎÉղä˼ºÇÔ¤·¤¿¡£
+へのセグメントの付加に失敗した。
 .\"O or
 .\"O .B SHM_REMAP
 .\"O was specified and
 .\"O .I shmaddr
 .\"O was NULL.
-¤Þ¤¿¤Ï
+または
 .B SHM_REMAP
-¤¬»ØÄꤵ¤ì¤Æ¤¤¤ë¤¬¡¢
+が指定されているが、
 .I shmaddr
-¤¬ NULL ¤Ç¤¢¤Ã¤¿¡£
+が NULL であった。
 .TP
 .B ENOMEM
 .\"O Could not allocate memory for the descriptor or for the page tables.
-¥Ç¥£¥¹¥¯¥ê¥×¥¿¡¼ (descriptor) ¤ä¥Ú¡¼¥¸¡¦¥Æ¡¼¥Ö¥ë¤Î¤¿¤á¤Î¥á¥â¥ê¤ò
-³ä¤êÅö¤Æ¤ë¤³¤È¤¬¤Ç¤­¤Ê¤¤¡£
+ディスクリプター (descriptor) やページ・テーブルのためのメモリを
+割り当てることができない。
 .PP
 .\"O When
 .\"O .BR shmdt ()
@@ -377,9 +377,9 @@ shmat, shmdt \- 
 .\"O .I errno
 .\"O is set as follows:
 .BR shmdt ()
-¤¬¼ºÇÔ¤·¤¿¾ì¹ç¡¢
+が失敗した場合、
 .B EINVAL
-¤Ï°Ê²¼¤Î¤è¤¦¤Ë¥»¥Ã¥È¤µ¤ì¤ë:
+は以下のようにセットされる:
 .TP
 .B EINVAL
 .\"O There is no shared memory segment attached at
@@ -389,16 +389,16 @@ shmat, shmdt \- 
 .\"O .I shmaddr
 .\"O is not aligned on a page boundary.
 .I shmaddr
-¤ËÉղ䵤줿¶¦Í­¥á¥â¥ê¡¦¥»¥°¥á¥ó¥È¤¬Â¸ºß¤·¤Ê¤¤¡£
-¤â¤·¤¯¤Ï¡¢
-.\" ¤³¤Á¤é¤Ï 2.6.17-rc1 °Ê¹ß¤Î¾ì¹ç¤À¤±¡£
+に付加された共有メモリ・セグメントが存在しない。
+もしくは、
+.\" こちらは 2.6.17-rc1 以降の場合だけ。
 .I shmaddr
-¤¬¥Ú¡¼¥¸¶­³¦¤Ë¹ç¤Ã¤Æ¤¤¤Ê¤¤¡£
+がページ境界に合っていない。
 .\"O .SH "CONFORMING TO"
-.SH ½àµò
+.SH 準拠
 SVr4, POSIX.1-2001.
 .\"O .\" SVr4 documents an additional error condition EMFILE.
-.\" SVr4 ¤Ë¤Ï¾¤Ë EMFILE ¥¨¥é¡¼¾õÂ֤ˤĤ¤¤Æ¤Îµ­½Ò¤¬¤¢¤ë¡£
+.\" SVr4 には他に EMFILE エラー状態についての記述がある。
 
 .\"O In SVID 3 (or perhaps earlier)
 .\"O the type of the \fIshmaddr\fP argument was changed from
@@ -415,60 +415,60 @@ SVr4, POSIX.1-2001.
 .\"O .I "char *"
 .\"O prototypes; glibc2 has
 .\"O .IR "void *" .)
-SVID 3 ¤Ç (¤¿¤Ö¤ó¤½¤ì¤è¤êÁ°¤À¤È»×¤¦¤¬)
-\fIshmaddr\fP °ú¤­¿ô¤Î·¿¤Ï
+SVID 3 で (たぶんそれより前だと思うが)
+\fIshmaddr\fP 引き数の型は
 .I "char *"
-¤«¤é
+から
 .I "const void *"
-¤Ë¡¢\fIshmat\fP() ¤ÎÊÖ¤êÃͤη¿¤Ï
+に、\fIshmat\fP() の返り値の型は
 .I "char *"
-¤«¤é
+から
 .I "void *"
-¤ËÊѹ¹¤µ¤ì¤¿
-(Linux ¤Ç¤Ï libc4 ¤È libc5 ¤Î¥×¥í¥È¥¿¥¤¥×¤Ï
+に変更された
+(Linux では libc4 と libc5 のプロトタイプは
 .I "char *"
-¤Ç¤¢¤ê¡¢glibc2 ¤Î¥×¥í¥È¥¿¥¤¥×¤Ï
+であり、glibc2 のプロトタイプは
 .I "void *"
-¤Ç¤¢¤ë)¡£
+である)。
 .\"O .SH NOTES
-.SH Ãí°Õ
+.SH 注意
 .\"O Using
 .\"O .BR shmat ()
 .\"O with
 .\"O .I shmaddr
 .\"O equal to NULL
 .\"O is the preferred, portable way of attaching a shared memory segment.
-¶¦Í­¥á¥â¥ê¥»¥°¥á¥ó¥È¤òÉղ乤ë¾ì¹ç¤Î°Ü¿¢À­¤Î¹â¤¤ÊýË¡¤È¤·¤Æ¤Ï¡¢
+共有メモリセグメントを付加する場合の移植性の高い方法としては、
 .I shmaddr
-¤ò NULL ¤Ë¤·¤Æ
+を NULL にして
 .BR shmat ()
-¤ò»ÈÍѤ¹¤ë¤Î¤¬¤è¤¤¡£
+を使用するのがよい。
 .\"O Be aware that the shared memory segment attached in this way
 .\"O may be attached at different addresses in different processes.
-¤³¤Î¤è¤¦¤ÊÊýË¡¤ÇÉղ䵤ì¤ë¶¦Í­¥á¥â¥ê¥»¥°¥á¥ó¥È¤Ï¡¢
-¥×¥í¥»¥¹¤¬°Û¤Ê¤ì¤ÐÊ̤Υ¢¥É¥ì¥¹¤ËÉղ䵤ì¤ë¡¢¤È¤¤¤¦ÅÀ¤ËÃí°Õ¤¹¤ë¤³¤È¡£
+このような方法で付加される共有メモリセグメントは、
+プロセスが異なれば別のアドレスに付加される、という点に注意すること。
 .\"O Therefore, any pointers maintained within the shared memory must be
 .\"O made relative (typically to the starting address of the segment),
 .\"O rather than absolute.
-¤è¤Ã¤Æ¶¦Í­¥á¥â¥êÆâ¤Ç´ÉÍý¤µ¤ì¤ë¥Ý¥¤¥ó¥¿¤Ï¡¢
-ÀäÂÐ¥¢¥É¥ì¥¹¤Ç¤Ï¤Ê¤¯¡¢
-(°ìÈÌŪ¤Ë¤Ï¥»¥°¥á¥ó¥È¤Î³«»Ï¥¢¥É¥ì¥¹¤«¤é¤Î)
-ÁêÂÐ¥¢¥É¥ì¥¹¤ÇºîÀ®¤¹¤ë¤Ù¤­¤Ç¤¢¤ë¡£
+よって共有メモリ内で管理されるポインタは、
+絶対アドレスではなく、
+(一般的にはセグメントの開始アドレスからの)
+相対アドレスで作成するべきである。
 .PP
 .\"O On Linux, it is possible to attach a shared memory segment even if it
 .\"O is already marked to be deleted.
 .\"O However, POSIX.1-2001 does not specify this behavior and
 .\"O many other implementations do not support it.
-Linux ¤Ç¤Ï¶¦Í­¥á¥â¥ê¥»¥°¥á¥ó¥È¤Ë´û¤Ëºï½ü¥Þ¡¼¥¯¤¬ÉÕ¤±¤é¤ì¤Æ¤¤¤Æ¤â¡¢
-¤½¤Î¶¦Í­¥á¥â¥ê¥»¥°¥á¥ó¥È¤òÉղ乤뤳¤È¤¬¤Ç¤­¤ë¡£
-¤·¤«¤· POSIX.1-2001 ¤Ç¤Ï¤³¤Î¤è¤¦¤ÊÆ°ºî¤ò»ØÄꤷ¤Æ¤ª¤é¤º¡¢
-¾¤Î¿¤¯¤Î¼ÂÁõ¤â¤³¤ì¤ò¥µ¥Ý¡¼¥È¤·¤Æ¤¤¤Ê¤¤¡£
+Linux では共有メモリセグメントに既に削除マークが付けられていても、
+その共有メモリセグメントを付加することができる。
+しかし POSIX.1-2001 ではこのような動作を指定しておらず、
+他の多くの実装もこれをサポートしていない。
 .LP
 .\"O The following system parameter affects
 .\"O .BR shmat ():
-°Ê²¼¤Î¥·¥¹¥Æ¥à¡¦¥Ñ¥é¥á¡¼¥¿¡¼¤Ï¡¢
+以下のシステム・パラメーターは、
 .BR shmat ()
-¤Ë±Æ¶Á¤¹¤ë:
+に影響する:
 .TP
 .\" FIXME A good explanation of the rationale for the existence
 .\" of SHMLBA would be useful here
@@ -479,12 +479,12 @@ Linux 
 .\"O .B SHMLBA
 .\"O value is
 .\"O .BR PAGE_SIZE .
-¥»¥°¥á¥ó¥È¤Î¶­³¦¥¢¥É¥ì¥¹¤ÎºÇ¾®ÇÜ¿ô¡£¥Ú¡¼¥¸¶­³¦¤Ë¹ç¤Ã¤Æ¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£
-¸½ºß¤Î¼ÂÁõ¤Ç¤Ï
+セグメントの境界アドレスの最小倍数。ページ境界に合ってなければならない。
+現在の実装では
 .B SHMLBA
-¤ÎÃͤÏ
+の値は
 .B PAGE_SIZE
-¤Ç¤¢¤ë¡£
+である。
 .\" FIXME That last sentence isn't true for all Linux
 .\" architectures (i.e., SHMLBA != PAGE_SIZE for some architectures)
 .\" -- MTK, Nov 04
@@ -492,12 +492,12 @@ Linux 
 .\"O The implementation places no intrinsic limit on the per-process maximum
 .\"O number of shared memory segments
 .\"O .RB ( SHMSEG ).
-¸½ºß¤Î¼ÂÁõ¤Ç¤Ï¡¢¥×¥í¥»¥¹¤´¤È¤Î
-¶¦Í­¥á¥â¥ê¡¦¥»¥°¥á¥ó¥È¤ÎºÇÂç¿ô
+現在の実装では、プロセスごとの
+共有メモリ・セグメントの最大数
 .RB ( SHMSEG )
-¤Ë´Ø¤¹¤ë¼ÂÁõ°Í¸¤ÎÀ©¸Â¤Ï¤Ê¤¤¡£
+に関する実装依存の制限はない。
 .\"O .SH "SEE ALSO"
-.SH ´ØÏ¢¹àÌÜ
+.SH 関連項目
 .BR brk (2),
 .BR mmap (2),
 .BR shmctl (2),