X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=draft%2Fman7%2Fsvipc.7;h=cb0564f92496b9aaef480edeb91b8aaec9cab27d;hb=40274b7d79d419993de4a745e3ae86ca6d0f417f;hp=2044931b063a7ba4dd064418e4c273b3fa068011;hpb=ce024239a1d8e74a7a44f7c24cee4375cb13b3ef;p=linuxjm%2FLDP_man-pages.git diff --git a/draft/man7/svipc.7 b/draft/man7/svipc.7 index 2044931b..cb0564f9 100644 --- a/draft/man7/svipc.7 +++ b/draft/man7/svipc.7 @@ -1,5 +1,6 @@ .\" Copyright 1993 Giorgio Ciucci (giorgio@crcc.it) .\" +.\" %%%LICENSE_START(VERBATIM) .\" Permission is granted to make and distribute verbatim copies of this .\" manual provided the copyright notice and this permission notice are .\" preserved on all copies. @@ -19,76 +20,55 @@ .\" .\" Formatted or processed versions of this manual, if unaccompanied by .\" the source, must acknowledge the copyright and authors of this work. +.\" %%%LICENSE_END +.\" +.\" FIXME There is now duplication of some of the information +.\" below in semctl.2, msgctl.2, and shmctl.2 -- MTK, Nov 04 +.\" +.\" FIXME Ultimately, there should probably be +.\" svmq_overview(7), svshm_overview(7), and sem_overview(7) +.\" that provide an overview of each System V IPC mechanism. +.\" In that case: +.\" * Those files should add a discussion of the /proc/sysvipc +.\" interfaces. +.\" * Documentation of the various /proc interfaces should move into +.\" those files (from proc(5)), and references in the various *.2 +.\" pages that refer to the /proc files should be adjusted. +.\" * The only part that uniquely belongs in svipc(7) is perphaps +.\" the discussion of ipc_perm. +.\" +.\"******************************************************************* +.\" +.\" This file was generated with po4a. Translate the source file. +.\" +.\"******************************************************************* .\" .\" Japanese Version Copyright (c) 1998 HANATAKA Shinya .\" all rights reserved. .\" Translated Wed Feb 11 21:29:14 JST 1998 .\" by HANATAKA Shinya .\" -.\"WORD: semaphore set セマフォー集合 -.\"WORD: shared memory segment 共有メモリ・セグメント -.\"WORD: message queue メッセージ・キュー -.\" -.\" FIXME There is now duplication of some of the information -.\" below in semctl.2, msgctl.2, and shmctl.2 -- MTK, Nov 04 -.TH SVIPC 7 2009-01-26 "Linux" "Linux Programmer's Manual" -.\"O .SH NAME +.TH SVIPC 7 2013\-02\-12 Linux "Linux Programmer's Manual" .SH 名前 -.\"O svipc \- System V interprocess communication mechanisms svipc \- System V プロセス間通信機構 -.\"O .SH SYNOPSIS .SH 書式 .nf -.B #include -.B #include -.B #include -.B #include -.B #include +\fB#include \fP +\fB#include \fP +\fB#include \fP .fi -.\"O .SH DESCRIPTION .SH 説明 -.\"O This manual page refers to the Linux implementation of the System V -.\"O interprocess communication (IPC) mechanisms: -.\"O message queues, semaphore sets, and shared memory segments. -.\"O In the following, the word -.\"O .I resource -.\"O means an instantiation of one among such mechanisms. -このマニュアル・ページは System V プロセス間通信 -(interprocess communication; IPC) 機構の Linux に -おける実装を説明する。 -このプロセス間通信機構には、 -メッセージ・キュー (message queue)、セマフォー集合 (semaphore set)、 -共有メモリ・セグメント (shared memory segment) などがある。以下で -.I "資源 (resource)" +このマニュアルページは System V プロセス間通信 (interprocess communication; IPC) 機構の Linux に +おける実装を説明する。 このプロセス間通信機構には、 メッセージキュー (message queue)、セマフォー集合 (semaphore set)、 +共有メモリセグメント (shared memory segment) などがある。以下で \fI資源 (resource)\fP という用語を使用した場合にはこれらの機構のどれかを意味する。 -.\"O .SS Resource Access Permissions .SS 資源へのアクセス許可 -.\"O For each resource, the system uses a common structure of type -.\"O .I "struct ipc_perm" -.\"O to store information needed in determining permissions to perform an -.\"O IPC operation. -システムのそれぞれの資源は、IPC への操作を許可するかどうかを決定する -ための情報を共通の構造体 -.I "struct ipc_perm" -に格納して使用する。 -.\"O The -.\"O .I ipc_perm -.\"O structure, defined by the -.\"O .I -.\"O system header file, includes the following members: -.I ipc_perm -構造体は、ヘッダーファイルの -.I -に定義されており、以下のメンバーが含まれている: +システムのそれぞれの資源は、IPC への操作を許可するかどうかを決定する ための情報を共通の構造体 \fIstruct ipc_perm\fP +に格納して使用する。 \fIipc_perm\fP 構造体には以下のメンバーが定義されている: .in +4n .nf struct ipc_perm { -.\"O uid_t cuid; /* creator user ID */ -.\"O gid_t cgid; /* creator group ID */ -.\"O uid_t uid; /* owner user ID */ -.\"O gid_t gid; /* owner group ID */ -.\"O unsigned short mode; /* r/w permissions */ uid_t cuid; /* 作成者のユーザーID */ gid_t cgid; /* 作成者のグループID */ uid_t uid; /* 所有者のユーザーID */ @@ -98,125 +78,56 @@ struct ipc_perm { .fi .in .PP -.\"O The -.\"O .I mode -.\"O member of the -.\"O .I ipc_perm -.\"O structure defines, with its lower 9 bits, the access permissions to the -.\"O resource for a process executing an IPC system call. -.\"O The permissions are interpreted as follows: -.I ipc_perm -構造体の -.I mode -メンバーは以下の 9 ビットで、プロセスの IPC システム・コール -による資源へのアクセス許可を定義する。 -許可は以下のように解釈される: +\fIipc_perm\fP 構造体の \fImode\fP メンバーは以下の 9 ビットで、プロセスの IPC システムコール +による資源へのアクセス許可を定義する。 許可は以下のように解釈される: .sp .nf -.\"O 0400 Read by user. -.\"O 0200 Write by user. 0400 ユーザーによる読み込み。 0200 ユーザーによる書き込み。 .sp .5 -.\"O 0040 Read by group. -.\"O 0020 Write by group. 0040 グループによる読み込み。 0020 グループによる書き込み。 .sp .5 -.\"O 0004 Read by others. -.\"O 0002 Write by others. 0004 他人による読み込み。 0002 他人による書き込み。 .fi .PP -.\"O Bits 0100, 0010, and 0001 (the execute bits) are unused by the system. -.\"O Furthermore, -.\"O "write" -.\"O effectively means -.\"O "alter" -.\"O for a semaphore set. -システムはビット 0100, 0010, 0001 (実行ビット) は使用しない。 -さらに、セマフォーの場合には -"書き込み(write)" -は実際には -"変更(alter)" -を意味する。 +システムはビット 0100, 0010, 0001 (実行ビット) は使用しない。 さらに、セマフォーの場合には "書き込み(write)" は実際には +"変更(alter)" を意味する。 .PP -.\"O The same system header file also defines the following symbolic -.\"O constants: 同じヘッダーファイルには以下のシンボルの定義が含まれている: -.TP 14 -.B IPC_CREAT -.\"O Create entry if key doesn't exist. +.TP 14 +\fBIPC_CREAT\fP キー(key)が存在しない場合には新たなエントリを作成する。 -.TP -.B IPC_EXCL -.\"O Fail if key exists. +.TP +\fBIPC_EXCL\fP キー(key)が存在する場合には失敗する。 -.TP -.B IPC_NOWAIT -.\"O Error if request must wait. +.TP +\fBIPC_NOWAIT\fP 要求が待たされる場合にはエラーになる。 -.TP -.B IPC_PRIVATE -.\"O Private key. -プライベート・キー。 -.TP -.B IPC_RMID -.\"O Remove resource. +.TP +\fBIPC_PRIVATE\fP +プライベートキー。 +.TP +\fBIPC_RMID\fP 資源を削除する。 -.TP -.B IPC_SET -.\"O Set resource options. +.TP +\fBIPC_SET\fP 資源にオプションを設定する。 -.TP -.B IPC_STAT -.\"O Get resource options. +.TP +\fBIPC_STAT\fP 資源のオプションを取得する。 .PP -.\"O Note that -.\"O .B IPC_PRIVATE -.\"O is a -.\"O .I key_t -.\"O type, while all the other symbolic constants are flag fields and can -.\"O be OR'ed into an -.\"O .I int -.\"O type variable. -.B IPC_PRIVATE -は -.I key_t -型である。その他の全てのシンボルはフラグ・フィールドとして -.I int -変数に OR 演算で格納することができる。 -.\"O .SS Message Queues -.SS メッセージ・キュー -.\"O A message queue is uniquely identified by a positive integer -.\"O .RI "(its " msqid ) -.\"O and has an associated data structure of type -.\"O .IR "struct msqid_ds" , -.\"O defined in -.\"O .IR , -.\"O containing the following members: -メッセージ・キューは正の整数 -.RI "(" msqid ) -によって識別され、 -.I -に定義されている構造体 -.IR "struct msqid_ds" -に結びつけられている。 -この構造体は以下のメンバーを含んでいる: +\fBIPC_PRIVATE\fP は \fIkey_t\fP 型である。その他の全てのシンボルはフラグフィールドとして \fIint\fP 変数に OR +演算で格納することができる。 +.SS メッセージキュー +メッセージキューは正の整数 (\fImsqid\fP) によって識別され、 \fI\fP に定義されている構造体 +\fIstruct msqid_ds\fP に結びつけられている。 この構造体は以下のメンバーを含んでいる: .in +4n .nf struct msqid_ds { struct ipc_perm msg_perm; -.\"O msgqnum_t msg_qnum; /* no of messages on queue */ -.\"O msglen_t msg_qbytes; /* bytes max on a queue */ -.\"O pid_t msg_lspid; /* PID of last msgsnd(2) call */ -.\"O pid_t msg_lrpid; /* PID of last msgrcv(2) call */ -.\"O time_t msg_stime; /* last msgsnd(2) time */ -.\"O time_t msg_rtime; /* last msgrcv(2) time */ -.\"O time_t msg_ctime; /* last change time */ msgqnum_t msg_qnum; /* キューにあるメッセージの数 */ msglen_t msg_qbytes; /* キューの最大バイト数 */ pid_t msg_lspid; /* 最後に msgsnd(2) をした PID */ @@ -227,208 +138,94 @@ struct msqid_ds { }; .fi .in -.TP 11 -.I msg_perm -.\"O .I ipc_perm -.\"O structure that specifies the access permissions on the message -.\"O queue. -メッセージ・キューへのアクセス許可を指定する -.I ipc_perm -構造体。 -.TP -.I msg_qnum -.\"O Number of messages currently on the message queue. -現在、このメッセージ・キューにあるメッセージの数。 -.TP -.I msg_qbytes -.\"O Maximum number of bytes of message text allowed on the message -.\"O queue. -メッセージ・キューに入れることができるメッセージの最大バイト数。 -.TP -.I msg_lspid -.\"O ID of the process that performed the last -.\"O .BR msgsnd (2) -.\"O system call. -最後に -.BR msgsnd (2) -システム・コールを行なったプロセスの ID。 -.TP -.I msg_lrpid -.\"O ID of the process that performed the last -.\"O .BR msgrcv (2) -.\"O system call. -最後に -.BR msgrcv (2) -システム・コールを行なったプロセスの ID。 -.TP -.I msg_stime -.\"O Time of the last -.\"O .BR msgsnd (2) -.\"O system call. -最後に -.BR msgsnd (2) -システム・コールを行なった時間。 -.I msg_rtime -.\"O Time of the last -.\"O .BR msgrcv (2) -.\"O system call. -最後に -.BR msgrcv (2) -を行なった時間。 -.TP -.I msg_ctime -.\"O Time of the last -.\"O system call that changed a member of the -.\"O .I msqid_ds -.\"O structure. -最後に -.I msqid_ds -構造体のメンバーが変更された時間。 -.\"O .SS Semaphore Sets +.TP 11 +\fImsg_perm\fP +メッセージキューへのアクセス許可を指定する \fIipc_perm\fP 構造体。 +.TP +\fImsg_qnum\fP +現在、このメッセージキューにあるメッセージの数。 +.TP +\fImsg_qbytes\fP +メッセージキューに入れることができるメッセージの最大バイト数。 +.TP +\fImsg_lspid\fP +最後に \fBmsgsnd\fP(2) システムコールを行なったプロセスの ID。 +.TP +\fImsg_lrpid\fP +最後に \fBmsgrcv\fP(2) システムコールを行なったプロセスの ID。 +.TP +\fImsg_stime\fP +最後に \fBmsgsnd\fP(2) システムコールを行なった時間。 +.TP +\fImsg_rtime\fP +最後に \fBmsgrcv\fP(2) を行なった時間。 +.TP +\fImsg_ctime\fP +最後に \fImsqid_ds\fP 構造体のメンバーが変更された時間。 .SS セマフォー集合 -.\"O A semaphore set is uniquely identified by a positive integer -.\"O .RI "(its " semid ) -.\"O and has an associated data structure of type -.\"O .IR "struct semid_ds" , -.\"O defined in -.\"O .IR , -.\"O containing the following members: -セマフォー集合は正の整数 -.RI "(" semid ) -によって識別され、 -.I -に定義されている構造体 -.IR "struct semid_ds" -に結びつけられている。 -この構造体は以下のメンバーを含んでいる: +セマフォー集合は正の整数 (\fIsemid\fP) によって識別され、 \fI\fP に定義されている構造体 +\fIstruct semid_ds\fP に結びつけられている。 この構造体は以下のメンバーを含んでいる: .in +4n .nf struct semid_ds { struct ipc_perm sem_perm; -.\"O time_t sem_otime; /* last operation time */ -.\"O time_t sem_ctime; /* last change time */ -.\"O unsigned long sem_nsems; /* count of sems in set */ time_t sem_otime; /* 最後に操作した時間 */ time_t sem_ctime; /* 最後に変更した時間 */ unsigned long sem_nsems; /* 集合の中にあるセマフォー数 */ }; .fi .in -.TP 11 -.I sem_perm -.\"O .I ipc_perm -.\"O structure that specifies the access permissions on the semaphore -.\"O set. -セマフォー集合へのアクセス許可を指定する -.I ipc_perm -構造体。 -.TP -.I sem_otime -.\"O Time of last -.\"O .BR semop (2) -.\"O system call. -最後に -.BR semop (2) -システム・コールを行なった時間。 -.TP -.I sem_ctime -.\"O Time of last -.\"O .BR semctl (2) -.\"O system call that changed a member of the above structure or of one -.\"O semaphore belonging to the set. -最後に -.BR semctl (2) -を行なって上記の構造体のメンバーを変更するか、セマフォー集合に属する -セマフォーを変更した時間。 -.TP -.I sem_nsems -.\"O Number of semaphores in the set. -.\"O Each semaphore of the set is referenced by a nonnegative integer -.\"O ranging from -.\"O .B 0 -.\"O to -.\"O .IR sem_nsems\-1 . -セマフォー集合の中にあるセマフォーの数。 -集合の中にあるそれぞれのセマフォーは負でない整数によって参照され、 -.B 0 -から -.I sem_nsems\-1 -までの番号を持つ。 +.TP 11 +\fIsem_perm\fP +セマフォー集合へのアクセス許可を指定する \fIipc_perm\fP 構造体。 +.TP +\fIsem_otime\fP +最後に \fBsemop\fP(2) システムコールを行なった時間。 +.TP +\fIsem_ctime\fP +最後に \fBsemctl\fP(2) を行なって上記の構造体のメンバーを変更するか、セマフォー集合に属する セマフォーを変更した時間。 +.TP +\fIsem_nsems\fP +セマフォー集合の中にあるセマフォーの数。 集合の中にあるそれぞれのセマフォーは負でない整数によって参照され、 \fB0\fP から +\fIsem_nsems\-1\fP までの番号を持つ。 .PP -.\"O A semaphore is a data structure of type -.\"O .I "struct sem" -.\"O containing the following members: -セマフォーは -.I "struct sem" -型のデータ構造体であり、以下のメンバーを含んでいる: +セマフォーは \fIstruct sem\fP 型のデータ構造体であり、以下のメンバーを含んでいる: .in +4n .nf +.\" unsigned short semncnt; /* nr awaiting semval to increase */ +.\" unsigned short semzcnt; /* nr awaiting semval = 0 */ struct sem { -.\"O int semval; /* semaphore value */ -.\"O int sempid; /* PID for last operation */ -.\"O .\" unsigned short semncnt; /* nr awaiting semval to increase */ -.\"O .\" unsigned short semzcnt; /* nr awaiting semval = 0 */ int semval; /* セマフォーの値 */ int sempid; /* 最後に操作したプロセス ID */ -.\" unsigned short semncnt; /* semval の増加を待つ数 */ -.\" unsigned short semzcnt; /* semval = 0 を待つ数 */ }; .fi .in -.TP 11 -.I semval -.\"O Semaphore value: a nonnegative integer. +.TP 11 +\fIsemval\fP セマフォー値: 負でない整数。 -.TP -.I sempid -.\"O ID of the last process that performed a semaphore operation -.\"O on this semaphore. -このセマフォーを最後に操作したプロセスの ID。 +.TP +\fIsempid\fP .\".TP .\".I semncnt -.\"O .\"Number of processes suspended awaiting for -.\"O .\".I semval -.\"O .\"to increase. +.\"Number of processes suspended awaiting for .\".I semval -.\"の値が増加するを待って停止しているプロセスの数。 +.\"to increase. .\".TP .\".I semznt -.\"O .\"Number of processes suspended awaiting for -.\"O .\".I semval -.\"O .\"to become zero. +.\"Number of processes suspended awaiting for .\".I semval -.\"が 0 になるのを待って停止しているプロセスの数。 -.\"O .SS Shared Memory Segments -.SS 共有メモリ・セグメント -.\"O A shared memory segment is uniquely identified by a positive integer -.\"O .RI "(its " shmid ) -.\"O and has an associated data structure of type -.\"O .IR "struct shmid_ds" , -.\"O defined in -.\"O .IR , -.\"O containing the following members: -共有メモリ・セグメトは正の整数 -.RI "(" shmid ) -によって識別され、 -.I -に定義されている -.IR "struct shmid_ds" -構造体に結びつけられている。 -この構造体は以下のメンバーを含んでいる: +.\"to become zero. +このセマフォーを最後に操作したプロセスの ID。 +.SS 共有メモリセグメント +共有メモリセグメントは正の整数 (\fIshmid\fP) によって識別され、 \fI\fP に定義されている +\fIstruct shmid_ds\fP 構造体に結びつけられている。 この構造体は以下のメンバーを含んでいる: .in +4n .nf struct shmid_ds { struct ipc_perm shm_perm; -.\"O size_t shm_segsz; /* size of segment */ -.\"O pid_t shm_cpid; /* PID of creator */ -.\"O pid_t shm_lpid; /* PID, last operation */ -.\"O shmatt_t shm_nattch; /* no. of current attaches */ -.\"O time_t shm_atime; /* time of last attach */ -.\"O time_t shm_dtime; /* time of last detach */ -.\"O time_t shm_ctime; /* time of last change */ size_t shm_segsz; /* セグメントのサイズ */ pid_t shm_cpid; /* 作成者のプロセス ID */ pid_t shm_lpid; /* 最後に操作したプロセス ID */ @@ -439,78 +236,35 @@ struct shmid_ds { }; .fi .in -.TP 11 -.I shm_perm -.\"O .I ipc_perm -.\"O structure that specifies the access permissions on the shared memory -.\"O segment. -共有メモリ・セグメントへのアクセス許可を指定した -.I ipc_perm -構造体。 -.TP -.I shm_segsz -.\"O .I shm_segsz -.\"O Size in bytes of the shared memory segment. -共有メモリ・セグメントのバイト数。 -.TP -.I shm_cpid -.\"O ID of the process that created the shared memory segment. -共有メモリ・セグメントを作成したプロセスの ID。 -.TP -.I shm_lpid -.\"O ID of the last process that executed a -.\"O .BR shmat (2) -.\"O or -.\"O .BR shmdt (2) -.\"O system call. -最後に -.BR shmat (2) -または -.BR shmdt (2) -システム・コールを実行したプロセスの ID。 -.TP -.I shm_nattch -.\"O Number of current alive attaches for this shared memory segment. -この共有メモリ・セグメントをメモリに付加 (attach) しているプロセスの数。 -.TP -.I shm_atime -.\"O Time of the last -.\"O .BR shmat (2) -.\"O system call. -最後に -.BR shmat (2) -システム・コールを行なった時間。 -.TP -.I shm_dtime -.\"O Time of the last -.\"O .BR shmdt (2) -.\"O system call. -最後に -.BR shmdt (2) -システム・コールを行なった時間。 -.TP -.I shm_ctime -.\"O Time of the last -.\"O .BR shmctl (2) -.\"O system call that changed -.\"O .IR shmid_ds . -最後に -.BR shmctl (2) -システム・コールを行なって、 -.I shmid_ds -構造体を変更した時間。 -.\"O .SH "SEE ALSO" +.TP 11 +\fIshm_perm\fP +共有メモリセグメントへのアクセス許可を指定した \fIipc_perm\fP 構造体。 +.TP +\fIshm_segsz\fP +共有メモリセグメントのバイト数。 +.TP +\fIshm_cpid\fP +共有メモリセグメントを作成したプロセスの ID。 +.TP +\fIshm_lpid\fP +最後に \fBshmat\fP(2) または \fBshmdt\fP(2) システムコールを実行したプロセスの ID。 +.TP +\fIshm_nattch\fP +この共有メモリセグメントをメモリに付加 (attach) しているプロセスの数。 +.TP +\fIshm_atime\fP +最後に \fBshmat\fP(2) システムコールを行なった時間。 +.TP +\fIshm_dtime\fP +最後に \fBshmdt\fP(2) システムコールを行なった時間。 +.TP +\fIshm_ctime\fP +最後に \fBshmctl\fP(2) システムコールを行なって、 \fIshmid_ds\fP 構造体を変更した時間。 .SH 関連項目 -.BR ipc (2), -.BR msgctl (2), -.BR msgget (2), -.BR msgrcv (2), -.BR msgsnd (2), -.BR semctl (2), -.BR semget (2), -.BR semop (2), -.BR shmat (2), -.BR shmctl (2), -.BR shmdt (2), -.BR shmget (2), -.BR ftok (3) +\fBipcmk\fP(1), \fBipcrm\fP(1), \fBipcs\fP(1), \fBipc\fP(2), \fBmsgctl\fP(2), \fBmsgget\fP(2), +\fBmsgrcv\fP(2), \fBmsgsnd\fP(2), \fBsemctl\fP(2), \fBsemget\fP(2), \fBsemop\fP(2), +\fBshmat\fP(2), \fBshmctl\fP(2), \fBshmdt\fP(2), \fBshmget\fP(2), \fBftok\fP(3) +.SH この文書について +この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.53 の一部 +である。プロジェクトの説明とバグ報告に関する情報は +http://www.kernel.org/doc/man\-pages/ に書かれている。