# SOME DESCRIPTIVE TITLE # Copyright (C) YEAR Free Software Foundation, Inc. # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. # msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "POT-Creation-Date: 2012-04-23 07:53+0900\n" "PO-Revision-Date: 2012-04-24 12:25+0900\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #. type: TH #: build/C/man3/mq_close.3:26 #, no-wrap msgid "MQ_CLOSE" msgstr "MQ_CLOSE" #. type: TH #: build/C/man3/mq_close.3:26 build/C/man3/mq_getattr.3:26 #: build/C/man2/mq_getsetattr.2:26 build/C/man3/mq_unlink.3:26 #, no-wrap msgid "2010-08-29" msgstr "2010-08-29" #. type: TH #: build/C/man3/mq_close.3:26 build/C/man3/mq_getattr.3:26 #: build/C/man2/mq_getsetattr.2:26 build/C/man3/mq_notify.3:26 #: build/C/man3/mq_open.3:26 build/C/man7/mq_overview.7:26 #: build/C/man3/mq_receive.3:26 build/C/man3/mq_send.3:26 #: build/C/man3/mq_unlink.3:26 build/C/man2/msgctl.2:35 #: build/C/man2/msgget.2:33 build/C/man2/msgop.2:38 #, no-wrap msgid "Linux" msgstr "Linux" #. type: TH #: build/C/man3/mq_close.3:26 build/C/man3/mq_getattr.3:26 #: build/C/man2/mq_getsetattr.2:26 build/C/man3/mq_notify.3:26 #: build/C/man3/mq_open.3:26 build/C/man7/mq_overview.7:26 #: build/C/man3/mq_receive.3:26 build/C/man3/mq_send.3:26 #: build/C/man3/mq_unlink.3:26 build/C/man2/msgctl.2:35 #: build/C/man2/msgget.2:33 build/C/man2/msgop.2:38 #, no-wrap msgid "Linux Programmer's Manual" msgstr "Linux Programmer's Manual" #. type: SH #: build/C/man3/mq_close.3:27 build/C/man3/mq_getattr.3:27 #: build/C/man2/mq_getsetattr.2:27 build/C/man3/mq_notify.3:27 #: build/C/man3/mq_open.3:27 build/C/man7/mq_overview.7:27 #: build/C/man3/mq_receive.3:27 build/C/man3/mq_send.3:27 #: build/C/man3/mq_unlink.3:27 build/C/man2/msgctl.2:36 #: build/C/man2/msgget.2:34 build/C/man2/msgop.2:39 #, no-wrap msgid "NAME" msgstr "名前" #. type: Plain text #: build/C/man3/mq_close.3:29 msgid "mq_close - close a message queue descriptor" msgstr "mq_close - メッセージキュー記述子をクローズする" #. type: SH #: build/C/man3/mq_close.3:29 build/C/man3/mq_getattr.3:29 #: build/C/man2/mq_getsetattr.2:29 build/C/man3/mq_notify.3:29 #: build/C/man3/mq_open.3:29 build/C/man3/mq_receive.3:29 #: build/C/man3/mq_send.3:29 build/C/man3/mq_unlink.3:29 #: build/C/man2/msgctl.2:38 build/C/man2/msgget.2:36 build/C/man2/msgop.2:41 #, no-wrap msgid "SYNOPSIS" msgstr "書式" #. type: Plain text #: build/C/man3/mq_close.3:32 build/C/man3/mq_getattr.3:32 #: build/C/man3/mq_notify.3:32 build/C/man3/mq_receive.3:32 #: build/C/man3/mq_send.3:32 build/C/man3/mq_unlink.3:32 #, no-wrap msgid "B<#include Emqueue.hE>\n" msgstr "B<#include Emqueue.hE>\n" #. type: Plain text #: build/C/man3/mq_close.3:34 #, no-wrap msgid "BIB<);>\n" msgstr "BIB<);>\n" #. type: Plain text #: build/C/man3/mq_close.3:37 build/C/man3/mq_getattr.3:40 #: build/C/man3/mq_notify.3:37 build/C/man3/mq_open.3:41 #: build/C/man3/mq_receive.3:45 build/C/man3/mq_send.3:45 #: build/C/man3/mq_unlink.3:37 msgid "Link with I<-lrt>." msgstr "I<-lrt> でリンクする。" #. type: SH #: build/C/man3/mq_close.3:37 build/C/man3/mq_getattr.3:40 #: build/C/man2/mq_getsetattr.2:37 build/C/man3/mq_notify.3:37 #: build/C/man3/mq_open.3:41 build/C/man7/mq_overview.7:29 #: build/C/man3/mq_receive.3:57 build/C/man3/mq_send.3:57 #: build/C/man3/mq_unlink.3:37 build/C/man2/msgctl.2:46 #: build/C/man2/msgget.2:44 build/C/man2/msgop.2:54 #, no-wrap msgid "DESCRIPTION" msgstr "説明" #. type: Plain text #: build/C/man3/mq_close.3:41 msgid "B() closes the message queue descriptor I." msgstr "" "B() はメッセージキュー記述子 (message queue descriptor) I " "をクローズする。" #. type: Plain text #: build/C/man3/mq_close.3:47 msgid "" "If the calling process has attached a notification request to this message " "queue via I, then this request is removed, and another process can " "now attach a notification request." msgstr "" "呼び出し元のプロセスが I 経由でこのメッセージキューに通知要求 " "(notification request) を設定している場合、通知要求は削除され、他のプロセス" "がそのキューに 対して通知要求を設定できるようになる。" #. type: SH #: build/C/man3/mq_close.3:47 build/C/man3/mq_getattr.3:118 #: build/C/man3/mq_notify.3:134 build/C/man3/mq_open.3:123 #: build/C/man3/mq_receive.3:113 build/C/man3/mq_send.3:119 #: build/C/man3/mq_unlink.3:44 build/C/man2/msgctl.2:224 #: build/C/man2/msgget.2:135 build/C/man2/msgop.2:285 #, no-wrap msgid "RETURN VALUE" msgstr "返り値" #. type: Plain text #: build/C/man3/mq_close.3:53 msgid "" "On success B() returns 0; on error, -1 is returned, with I " "set to indicate the error." msgstr "" "成功すると、 B() は 0 を返す。エラーの場合、-1 を返し、 I " "にエラーを示す値を設定する。" #. type: SH #: build/C/man3/mq_close.3:53 build/C/man3/mq_getattr.3:126 #: build/C/man3/mq_notify.3:140 build/C/man3/mq_open.3:135 #: build/C/man3/mq_receive.3:122 build/C/man3/mq_send.3:127 #: build/C/man3/mq_unlink.3:50 build/C/man2/msgctl.2:249 #: build/C/man2/msgget.2:141 build/C/man2/msgop.2:298 #, no-wrap msgid "ERRORS" msgstr "エラー" #. type: TP #: build/C/man3/mq_close.3:54 build/C/man3/mq_getattr.3:127 #: build/C/man3/mq_notify.3:141 build/C/man3/mq_receive.3:129 #: build/C/man3/mq_send.3:134 #, no-wrap msgid "B" msgstr "B" #. type: Plain text #: build/C/man3/mq_close.3:59 build/C/man3/mq_getattr.3:132 #: build/C/man3/mq_notify.3:146 msgid "The descriptor specified in I is invalid." msgstr "I に指定されたディスクリプタが不正である。" #. type: SH #: build/C/man3/mq_close.3:59 build/C/man3/mq_getattr.3:137 #: build/C/man2/mq_getsetattr.2:47 build/C/man3/mq_notify.3:174 #: build/C/man3/mq_open.3:224 build/C/man7/mq_overview.7:263 #: build/C/man3/mq_receive.3:156 build/C/man3/mq_send.3:161 #: build/C/man3/mq_unlink.3:62 build/C/man2/msgctl.2:309 #: build/C/man2/msgget.2:181 build/C/man2/msgop.2:397 #, no-wrap msgid "CONFORMING TO" msgstr "準拠" #. type: Plain text #: build/C/man3/mq_close.3:61 build/C/man3/mq_getattr.3:139 #: build/C/man3/mq_notify.3:176 build/C/man3/mq_open.3:226 #: build/C/man7/mq_overview.7:265 build/C/man3/mq_receive.3:158 #: build/C/man3/mq_send.3:163 build/C/man3/mq_unlink.3:64 msgid "POSIX.1-2001." msgstr "POSIX.1-2001." #. type: SH #: build/C/man3/mq_close.3:61 build/C/man3/mq_getattr.3:139 #: build/C/man2/mq_getsetattr.2:49 build/C/man7/mq_overview.7:265 #: build/C/man3/mq_receive.3:158 build/C/man3/mq_send.3:163 #: build/C/man2/msgctl.2:312 build/C/man2/msgget.2:183 #: build/C/man2/msgop.2:399 #, no-wrap msgid "NOTES" msgstr "注意" #. type: Plain text #: build/C/man3/mq_close.3:65 msgid "" "All open message queues are automatically closed on process termination, or " "upon B(2)." msgstr "" "プロセス終了時、もしくは B(2) 実行時に、全てのオープンされたメッセー" "ジキューは自動的にクローズされる。" #. type: SH #: build/C/man3/mq_close.3:65 build/C/man3/mq_getattr.3:147 #: build/C/man2/mq_getsetattr.2:53 build/C/man3/mq_notify.3:243 #: build/C/man3/mq_open.3:230 build/C/man7/mq_overview.7:281 #: build/C/man3/mq_receive.3:164 build/C/man3/mq_send.3:169 #: build/C/man3/mq_unlink.3:64 build/C/man2/msgctl.2:337 #: build/C/man2/msgget.2:215 build/C/man2/msgop.2:431 #, no-wrap msgid "SEE ALSO" msgstr "関連項目" #. type: Plain text #: build/C/man3/mq_close.3:73 msgid "" "B(3), B(3), B(3), B(3), " "B(3), B(3), B(7)" msgstr "" "B(3), B(3), B(3), B(3), " "B(3), B(3), B(7)" #. type: SH #: build/C/man3/mq_close.3:73 build/C/man3/mq_getattr.3:155 #: build/C/man2/mq_getsetattr.2:56 build/C/man3/mq_notify.3:252 #: build/C/man3/mq_open.3:238 build/C/man7/mq_overview.7:294 #: build/C/man3/mq_receive.3:173 build/C/man3/mq_send.3:178 #: build/C/man3/mq_unlink.3:72 build/C/man2/msgctl.2:344 #: build/C/man2/msgget.2:223 build/C/man2/msgop.2:437 #, no-wrap msgid "COLOPHON" msgstr "この文書について" #. type: Plain text #: build/C/man3/mq_close.3:80 build/C/man3/mq_getattr.3:162 #: build/C/man2/mq_getsetattr.2:63 build/C/man3/mq_notify.3:259 #: build/C/man3/mq_open.3:245 build/C/man7/mq_overview.7:301 #: build/C/man3/mq_receive.3:180 build/C/man3/mq_send.3:185 #: build/C/man3/mq_unlink.3:79 build/C/man2/msgctl.2:351 #: build/C/man2/msgget.2:230 build/C/man2/msgop.2:444 msgid "" "This page is part of release 3.38 of the Linux I project. A " "description of the project, and information about reporting bugs, can be " "found at http://www.kernel.org/doc/man-pages/." msgstr "" "この man ページは Linux I プロジェクトのリリース 3.38 の一部である。\n" "プロジェクトの説明とバグ報告に関する情報は\n" "http://www.kernel.org/doc/man-pages/ に書かれている。" #. type: TH #: build/C/man3/mq_getattr.3:26 #, no-wrap msgid "MQ_GETATTR" msgstr "MQ_GETATTR" #. type: Plain text #: build/C/man3/mq_getattr.3:29 msgid "mq_getattr, mq_setattr - get/set message queue attributes" msgstr "mq_getattr, mq_setattr - メッセージキューの属性を設定/取得する" #. type: Plain text #: build/C/man3/mq_getattr.3:34 #, no-wrap msgid "BIB<, struct mq_attr *>IB<);>\n" msgstr "BIB<, struct mq_attr *>IB<);>\n" #. type: Plain text #: build/C/man3/mq_getattr.3:37 #, no-wrap msgid "" "BIB<, struct mq_attr *>IB<,>\n" "B< struct mq_attr *>IB<);>\n" msgstr "" "BIB<, struct mq_attr *>IB<,>\n" "B< struct mq_attr *>IB<);>\n" #. type: Plain text #: build/C/man3/mq_getattr.3:47 msgid "" "B() and B() respectively retrieve and modify " "attributes of the message queue referred to by the descriptor I." msgstr "" "B() と B() は、記述子 I で参照されるメッセー" "ジキューの属性の取得と変更をそれぞれ行う。" #. type: Plain text #: build/C/man3/mq_getattr.3:54 msgid "" "B() returns an I structure in the buffer pointed by " "I. This structure is defined as:" msgstr "" "B() は、 I が指すバッファに I 構造体を格納して返" "す。この構造体は以下のように定義されている:" #. type: Plain text #: build/C/man3/mq_getattr.3:63 #, no-wrap msgid "" "struct mq_attr {\n" " long mq_flags; /* Flags: 0 or O_NONBLOCK */\n" " long mq_maxmsg; /* Max. # of messages on queue */\n" " long mq_msgsize; /* Max. message size (bytes) */\n" " long mq_curmsgs; /* # of messages currently in queue */\n" "};\n" msgstr "" "struct mq_attr {\n" " long mq_flags; /* フラグ: 0 か O_NONBLOCK */\n" " long mq_maxmsg; /* キューの最大メッセージ数 */\n" " long mq_msgsize; /* 最大メッセージサイズ (バイト単位) */\n" " long mq_curmsgs; /* キューに現在入っているメッセージ数 */\n" "};\n" #. type: Plain text #: build/C/man3/mq_getattr.3:73 msgid "" "The I field contains flags associated with the open message queue " "description. This field is initialized when the queue is created by " "B(3). The only flag that can appear in this field is B." msgstr "" "I フィールドには、オープンメッセージキュー記述 (open message queue " "description) に関連付けられているフラグが格納される。 このフィールドは " "B(3) でキューが作成される際に初期化される。 このフィールドに現れる" "フラグは B だけである。" #. type: Plain text #: build/C/man3/mq_getattr.3:94 msgid "" "The I and I fields are set when the message queue is " "created by B(3). The I field is an upper limit on the " "number of messages that may be placed on the queue using B(3). The " "I field is an upper limit on the size of messages that may be " "placed on the queue. Both of these fields must have a value greater than " "zero. Two I files that place ceilings on the values for these fields " "are described in B(3)." msgstr "" "I と I フィールドは B(3) でメッセージキュー" "が作成される際にセットされる。 I フィールドは、 B(3) を" "使ってキューに入れることができるメッセージ数の上限である。 I " "フィールドは、キューに入れることができるメッセージの 上限サイズである。 これ" "らのフィールドはどちらも 0 より大きな値でなければならない。 これらのフィール" "ドに設定できる値の上限は I ファイルにより決まる。 I ファイルの" "詳細は B(3) に説明されている。" #. type: Plain text #: build/C/man3/mq_getattr.3:98 msgid "" "The I field returns the number of messages currently held in the " "queue." msgstr "" "I フィールドはキューに現在格納されているメッセージ数を返す。" #. type: Plain text #: build/C/man3/mq_getattr.3:118 msgid "" "B() sets message queue attributes using information supplied in " "the I structure pointed to by I. The only attribute that " "can be modified is the setting of the B flag in I. " "The other fields in I are ignored. If the I field is not " "NULL, then the buffer that it points to is used to return an I " "structure that contains the same information that is returned by " "B()." msgstr "" "B() は、 I が指す I 構造体で与えられた情報を" "使って、メッセージキューの属性を設定する。 変更することができる属性は、 " "I の B フラグの設定だけである。 I の他のフィー" "ルドは無視される。 I フィールドが NULL 以外の場合、 B" "() が返すのと同じ情報を格納した I 構造体を I が指すバッ" "ファに入れて返す。" #. type: Plain text #: build/C/man3/mq_getattr.3:126 msgid "" "On success B() and B() return 0; on error, -1 is " "returned, with I set to indicate the error." msgstr "" "成功すると、 I と I は 0 を返す。エラーの場" "合、-1 を返し、 I にエラーを示す値を設定する。" #. type: TP #: build/C/man3/mq_getattr.3:132 build/C/man3/mq_notify.3:150 #: build/C/man3/mq_open.3:156 build/C/man3/mq_receive.3:138 #: build/C/man3/mq_send.3:143 build/C/man2/msgctl.2:280 #: build/C/man2/msgop.2:329 build/C/man2/msgop.2:385 #, no-wrap msgid "B" msgstr "B" #. type: Plain text #: build/C/man3/mq_getattr.3:137 msgid "Imq_flags> contained set bits other than B." msgstr "" "Imq_flags> に B 以外のビットがセットされていた。" #. type: Plain text #: build/C/man3/mq_getattr.3:147 msgid "" "On Linux, B() and B() are library functions " "layered on top of the B(2) system call." msgstr "" "Linux では、 B() と B() はライブラリ関数であり、 " "B(2) システムコールを用いて実装されている。" #. type: Plain text #: build/C/man3/mq_getattr.3:155 msgid "" "B(3), B(3), B(3), B(3), B" "(3), B(3), B(7)" msgstr "" "B(3), B(3), B(3), B(3), B" "(3), B(3), B(7)" #. type: TH #: build/C/man2/mq_getsetattr.2:26 #, no-wrap msgid "MQ_GETSETATTR" msgstr "MQ_GETSETATTR" #. type: Plain text #: build/C/man2/mq_getsetattr.2:29 msgid "mq_getsetattr - get/set message queue attributes" msgstr "mq_getsetattr - メッセージキューの属性を設定/取得する" #. type: Plain text #: build/C/man2/mq_getsetattr.2:33 #, no-wrap msgid "" "B<#include Esys/types.hE>\n" "B<#include Emqueue.hE>\n" msgstr "" "B<#include Esys/types.hE>\n" "B<#include Emqueue.hE>\n" #. type: Plain text #: build/C/man2/mq_getsetattr.2:36 #, no-wrap msgid "" "BIB<, struct mq_attr *>IB<,>\n" "B< struct mq_attr *>IB<);>\n" msgstr "" "BIB<, struct mq_attr *>IB<,>\n" "B< struct mq_attr *>IB<);>\n" #. type: Plain text #: build/C/man2/mq_getsetattr.2:39 msgid "Do not use this system call." msgstr "このシステムコールを使用しないこと。" #. type: Plain text #: build/C/man2/mq_getsetattr.2:47 msgid "" "This is the low-level system call used to implement B(3) and " "B(3). For an explanation of how this system call operates, see " "the description of B(3)." msgstr "" "B(3) と B(3) の実装に使用される低レベルのシステム" "コールである。 このシステムコールがどのように動作するかは B(3) " "の説明を参照のこと。" #. type: Plain text #: build/C/man2/mq_getsetattr.2:49 msgid "This interface is nonstandard; avoid its use." msgstr "このインタフェースは非標準である。使用を避けること。" #. type: Plain text #: build/C/man2/mq_getsetattr.2:53 msgid "" "Glibc does not provide a wrapper for this system call; call it using " "B(2). (Actually, never call it unless you are writing a C library!)" msgstr "" "glibc はこのシステムコールに対するラッパー関数を提供していない。 B" "(2) を使って呼び出すこと。 (実のところ、C ライブラリを書いているのでない限" "り、 決してこのシステムコールを呼び出さないこと!)" #. type: Plain text #: build/C/man2/mq_getsetattr.2:56 msgid "B(3), B(7)" msgstr "B(3), B(7)" #. type: TH #: build/C/man3/mq_notify.3:26 #, no-wrap msgid "MQ_NOTIFY" msgstr "MQ_NOTIFY" #. type: TH #: build/C/man3/mq_notify.3:26 #, no-wrap msgid "2010-10-04" msgstr "2010-10-04" #. type: Plain text #: build/C/man3/mq_notify.3:29 msgid "mq_notify - register for notification when a message is available" msgstr "mq_notify - メッセージ到着時に通知を行うよう登録する" #. type: Plain text #: build/C/man3/mq_notify.3:34 #, no-wrap msgid "BIB<, const struct sigevent *>IB<);>\n" msgstr "BIB<, const struct sigevent *>IB<);>\n" #. type: Plain text #: build/C/man3/mq_notify.3:43 msgid "" "B() allows the calling process to register or unregister for " "delivery of an asynchronous notification when a new message arrives on the " "empty message queue referred to by the descriptor I." msgstr "" "B() を使うと、ディスクリプタ I で参照される空のメッセージ" "キューに新しくメッセージが到着した時に 非同期の通知 (notification) の配送が行" "われるように登録したり、 その解除を行ったりできる。" #. type: Plain text #: build/C/man3/mq_notify.3:51 msgid "" "The I argument is a pointer to a I structure. For the " "definition and general details of this structure, see B(7)." msgstr "" "I 引き数は I 構造体へのポインタである。 この構造体の定義と一" "般的な詳細については B(7) を参照。" #. type: Plain text #: build/C/man3/mq_notify.3:65 msgid "" "If I is a non-NULL pointer, then B() registers the calling " "process to receive message notification. The I field of the " "I structure to which I points specifies how notification is " "to be performed. This field has one of the following values:" msgstr "" "I が NULL でないポインタであれば、 B() はメッセージ通知を受" "け取るように呼び出し元のプロセスを登録する。 I が指す I 構造" "体の I フィールドは、どのような通知を行うのかを指定する。 この" "フィールドは以下の値のいずれかを持つ。" #. type: TP #: build/C/man3/mq_notify.3:65 #, no-wrap msgid "B" msgstr "B" #. When is SIGEV_NONE useful? #. type: Plain text #: build/C/man3/mq_notify.3:70 msgid "" "A \"null\" notification: the calling process is registered as the target for " "notification, but when a message arrives, no notification is sent." msgstr "" "「空の (null)」の通知: 呼び出し元のプロセスを通知の宛先として登録するが、 実" "際にはメッセージが到着した時に通知は送られない。" #. type: TP #: build/C/man3/mq_notify.3:70 #, no-wrap msgid "B" msgstr "B" #. I don't know of other implementations that set #. si_pid and si_uid -- MTK #. type: Plain text #: build/C/man3/mq_notify.3:90 msgid "" "Notify the process by sending the signal specified in I. See " "B(7) for general details. The I field of the " "I structure will be set to B. In addition, I " "will be set to the PID of the process that sent the message, and I " "will be set to the real user ID of the sending process." msgstr "" "I で指定されたシグナルを送って、プロセスに通知する。 一般的な詳" "細については B(7) を参照。 I 構造体の I フィー" "ルドには B が設定される。 さらに、 I にはメッセージを送信し" "たプロセスの PID が、 I には送信プロセスの実ユーザ ID が設定される。" #. type: TP #: build/C/man3/mq_notify.3:90 #, no-wrap msgid "B" msgstr "B" #. type: Plain text #: build/C/man3/mq_notify.3:98 msgid "" "Upon message delivery, invoke I as if it were the " "start function of a new thread. See B(7) for details." msgstr "" "メッセージの配送時には、 I があたかも新しいスレッドの" "開始関数であるかのように起動される。 詳細は B(7) を参照。" #. type: Plain text #: build/C/man3/mq_notify.3:101 msgid "" "Only one process can be registered to receive notification from a message " "queue." msgstr "" "一つのメッセージキューから通知を受信するように登録できるプロセスは 一つだけで" "ある。" #. type: Plain text #: build/C/man3/mq_notify.3:108 msgid "" "If I is NULL, and the calling process is currently registered to " "receive notifications for this message queue, then the registration is " "removed; another process can then register to receive a message notification " "for this queue." msgstr "" "I が NULL で、かつ呼び出し元のプロセスがこのメッセージキューからの 通知" "を受信するに現在登録している場合、登録を削除する。 これ以降、別のプロセスがこ" "のメッセージキューから通知を受信するように 登録できるようになる。" #. type: Plain text #: build/C/man3/mq_notify.3:115 msgid "" "Message notification only occurs when a new message arrives and the queue " "was previously empty. If the queue was not empty at the time B" "() was called, then a notification will only occur after the queue is " "emptied and a new message arrives." msgstr "" "メッセージ通知は、それまで空のキューに新しいメッセージが到着した 場合にのみ行" "われる。 B() が呼び出された時にそのキューが空でない場合、 その" "キューが空になり、その後新しいメッセージが到着した時に 初めて通知が行われるこ" "とになる。" #. type: Plain text #: build/C/man3/mq_notify.3:123 msgid "" "If another process or thread is waiting to read a message from an empty " "queue using B(3), then any message notification registration is " "ignored: the message is delivered to the process or thread calling " "B(3), and the message notification registration remains in " "effect." msgstr "" "別のプロセスやスレッドが B(3) を使って、空のキューからメッセージ" "の読み出しを待っている場合、 メッセージ通知の登録は全て無視される。 メッセー" "ジは B(3) を呼び出しているプロセスやスレッドに配送され、 メッ" "セージ通知の登録は効力を持ったままとなる。" #. type: Plain text #: build/C/man3/mq_notify.3:134 msgid "" "Notification occurs once: after a notification is delivered, the " "notification registration is removed, and another process can register for " "message notification. If the notified process wishes to receive the next " "notification, it can use B() to request a further notification. " "This should be done before emptying all unread messages from the queue. " "(Placing the queue in nonblocking mode is useful for emptying the queue of " "messages without blocking once it is empty.)" msgstr "" "通知は一度だけ行われる。通知が送られた後は、通知要求の登録は削除され、 別のプ" "ロセスがメッセージ通知を受信するように登録できるようになる。 通知を受けたプロ" "セスが次の通知も受信したい場合は、 B() を使ってその後の通知も受け" "るように要求することができる。 B() を再度呼び出すのは、読み出して" "いないメッセージを全部読み出して キューが空になる前にすべきである (キューから" "のメッセージ読み出しをキューが空になった時に 停止 (block) せずに行うには、" "キューを非停止モード (non-blocking mode) に設定しておくとよい)。" #. type: Plain text #: build/C/man3/mq_notify.3:140 msgid "" "On success B() returns 0; on error, -1 is returned, with " "I set to indicate the error." msgstr "" "成功すると、 B() は 0 を返す。エラーの場合、-1 を返し、 I " "をエラーを示す値に設定する。" #. type: TP #: build/C/man3/mq_notify.3:146 #, no-wrap msgid "B" msgstr "B" #. type: Plain text #: build/C/man3/mq_notify.3:150 msgid "" "Another process has already registered to receive notification for this " "message queue." msgstr "" "別のプロセスがすでに このメッセージキューに対する通知を受信するように登録して" "いる。" #. type: Plain text #: build/C/man3/mq_notify.3:160 msgid "" "Isigev_notify> is not one of the permitted values; or Isigev_notify> is B and Isigev_signo> is not a " "valid signal number." msgstr "" "Isigev_notify> が許可された値のいずれでもない。もしくは Isigev_notify> が B だが Isigev_signo> が有効な" "シグナル番号ではない。" #. type: TP #: build/C/man3/mq_notify.3:160 build/C/man3/mq_open.3:214 #: build/C/man2/msgget.2:171 build/C/man2/msgop.2:340 #, no-wrap msgid "B" msgstr "B" #. type: Plain text #: build/C/man3/mq_notify.3:163 build/C/man3/mq_open.3:217 msgid "Insufficient memory." msgstr "十分なメモリがない。" #. Linux does not do this #. type: Plain text #: build/C/man3/mq_notify.3:174 msgid "" "POSIX.1-2008 says that an implementation I generate an B error " "if I is NULL, and the caller is not currently registered to receive " "notifications for the queue I." msgstr "" "POSIX.1-2008 では、 I が NULL で、呼び出し元のプロセスがキュー " "I に関する通知を受信するように登録されていない場合、エラー B " "を生成するような実装を行っても「よい」ことになっている。" #. type: SH #: build/C/man3/mq_notify.3:176 build/C/man7/mq_overview.7:278 #, no-wrap msgid "EXAMPLE" msgstr "例" #. type: Plain text #: build/C/man3/mq_notify.3:182 msgid "" "The following program registers a notification request for the message queue " "named in its command-line argument. Notification is performed by creating a " "thread. The thread executes a function which reads one message from the " "queue and then terminates the process." msgstr "" "以下のプログラムは、 コマンドライン引き数で指定された名前のメッセージキューへ" "の 通知要求を登録し、通知はスレッドの作成によって行われる。 そのスレッドは、" "そのキューからメッセージを一つ読み出してから、 プロセスを終了する関数を実行す" "る。" #. type: Plain text #: build/C/man3/mq_notify.3:189 #, no-wrap msgid "" "#include Epthread.hE\n" "#include Emqueue.hE\n" "#include Estdio.hE\n" "#include Estdlib.hE\n" "#include Eunistd.hE\n" msgstr "" "#include Epthread.hE\n" "#include Emqueue.hE\n" "#include Estdio.hE\n" "#include Estdlib.hE\n" "#include Eunistd.hE\n" #. type: Plain text #: build/C/man3/mq_notify.3:192 #, no-wrap msgid "" "#define handle_error(msg) \\e\n" " do { perror(msg); exit(EXIT_FAILURE); } while (0)\n" msgstr "" "#define handle_error(msg) \\e\n" " do { perror(msg); exit(EXIT_FAILURE); } while (0)\n" #. type: Plain text #: build/C/man3/mq_notify.3:200 #, no-wrap msgid "" "static void /* Thread start function */\n" "tfunc(union sigval sv)\n" "{\n" " struct mq_attr attr;\n" " ssize_t nr;\n" " void *buf;\n" " mqd_t mqdes = *((mqd_t *) sv.sival_ptr);\n" msgstr "" "static void /* スレッド開始関数 */\n" "tfunc(union sigval sv)\n" "{\n" " struct mq_attr attr;\n" " ssize_t nr;\n" " void *buf;\n" " mqd_t mqdes = *((mqd_t *) sv.sival_ptr);\n" #. type: Plain text #: build/C/man3/mq_notify.3:202 #, no-wrap msgid " /* Determine max. msg size; allocate buffer to receive msg */\n" msgstr "" " /* 最大メッセージサイズを決定し、\n" " メッセージ受信用のバッファを確保する */\n" #. type: Plain text #: build/C/man3/mq_notify.3:208 #, no-wrap msgid "" " if (mq_getattr(mqdes, &attr) == -1)\n" " handle_error(\"mq_getattr\");\n" " buf = malloc(attr.mq_msgsize);\n" " if (buf == NULL)\n" " handle_error(\"malloc\");\n" msgstr "" " if (mq_getattr(mqdes, &attr) == -1)\n" " handle_error(\"mq_getattr\");\n" " buf = malloc(attr.mq_msgsize);\n" " if (buf == NULL)\n" " handle_error(\"malloc\");\n" #. type: Plain text #: build/C/man3/mq_notify.3:212 #, no-wrap msgid "" " nr = mq_receive(mqdes, buf, attr.mq_msgsize, NULL);\n" " if (nr == -1)\n" " handle_error(\"mq_receive\");\n" msgstr "" " nr = mq_receive(mqdes, buf, attr.mq_msgsize, NULL);\n" " if (nr == -1)\n" " handle_error(\"mq_receive\");\n" #. type: Plain text #: build/C/man3/mq_notify.3:217 #, no-wrap msgid "" " printf(\"Read %ld bytes from MQ\\en\", (long) nr);\n" " free(buf);\n" " exit(EXIT_SUCCESS); /* Terminate the process */\n" "}\n" msgstr "" " printf(\"Read %ld bytes from MQ\\en\", (long) nr);\n" " free(buf);\n" " exit(EXIT_SUCCESS); /* プロセスを終了する */\n" "}\n" #. type: Plain text #: build/C/man3/mq_notify.3:223 #, no-wrap msgid "" "int\n" "main(int argc, char *argv[])\n" "{\n" " mqd_t mqdes;\n" " struct sigevent sev;\n" msgstr "" "int\n" "main(int argc, char *argv[])\n" "{\n" " mqd_t mqdes;\n" " struct sigevent sev;\n" #. type: Plain text #: build/C/man3/mq_notify.3:228 #, no-wrap msgid "" " if (argc != 2) {\n" "\tfprintf(stderr, \"Usage: %s Emq-nameE\\en\", argv[0]);\n" "\texit(EXIT_FAILURE);\n" " }\n" msgstr "" " if (argc != 2) {\n" "\tfprintf(stderr, \"Usage: %s Emq-nameE\\en\", argv[0]);\n" "\texit(EXIT_FAILURE);\n" " }\n" #. type: Plain text #: build/C/man3/mq_notify.3:232 #, no-wrap msgid "" " mqdes = mq_open(argv[1], O_RDONLY);\n" " if (mqdes == (mqd_t) -1)\n" " handle_error(\"mq_open\");\n" msgstr "" " mqdes = mq_open(argv[1], O_RDONLY);\n" " if (mqdes == (mqd_t) -1)\n" " handle_error(\"mq_open\");\n" #. type: Plain text #: build/C/man3/mq_notify.3:239 #, no-wrap msgid "" " sev.sigev_notify = SIGEV_THREAD;\n" " sev.sigev_notify_function = tfunc;\n" " sev.sigev_notify_attributes = NULL;\n" " sev.sigev_value.sival_ptr = &mqdes; /* Arg. to thread func. */\n" " if (mq_notify(mqdes, &sev) == -1)\n" " handle_error(\"mq_notify\");\n" msgstr "" " sev.sigev_notify = SIGEV_THREAD;\n" " sev.sigev_notify_function = tfunc;\n" " sev.sigev_notify_attributes = NULL;\n" " sev.sigev_value.sival_ptr = &mqdes; /* スレッド関数に渡す引き数 */\n" " if (mq_notify(mqdes, &sev) == -1)\n" " handle_error(\"mq_notify\");\n" #. type: Plain text #: build/C/man3/mq_notify.3:242 #, no-wrap msgid "" " pause(); /* Process will be terminated by thread function */\n" "}\n" msgstr "" " pause(); /* プロセスはスレッド関数により終了される */\n" "}\n" #. type: Plain text #: build/C/man3/mq_notify.3:252 msgid "" "B(3), B(3), B(3), B(3), B" "(3), B(3), B(7), B(7)" msgstr "" "B(3), B(3), B(3), B(3), B" "(3), B(3), B(7), B(7)" #. type: TH #: build/C/man3/mq_open.3:26 #, no-wrap msgid "MQ_OPEN" msgstr "MQ_OPEN" #. type: TH #: build/C/man3/mq_open.3:26 #, no-wrap msgid "2009-02-20" msgstr "2009-02-20" #. type: Plain text #: build/C/man3/mq_open.3:29 msgid "mq_open - open a message queue" msgstr "mq_open - メッセージキューをオープンする" #. type: Plain text #: build/C/man3/mq_open.3:34 #, no-wrap msgid "" "B<#include Efcntl.hE> /* For O_* constants */\n" "B<#include Esys/stat.hE> /* For mode constants */\n" "B<#include Emqueue.hE>\n" msgstr "" "B<#include Efcntl.hE> /* For O_* constants */\n" "B<#include Esys/stat.hE> /* For mode constants */\n" "B<#include Emqueue.hE>\n" #. type: Plain text #: build/C/man3/mq_open.3:38 #, no-wrap msgid "" "BIB<, int >IB<);>\n" "BIB<, int >IB<, mode_t >IB<,>\n" "B< struct mq_attr *>IB<);>\n" msgstr "" "BIB<, int >IB<);>\n" "BIB<, int >IB<, mode_t >IB<,>\n" "B< struct mq_attr *>IB<);>\n" #. type: Plain text #: build/C/man3/mq_open.3:50 msgid "" "B() creates a new POSIX message queue or opens an existing queue. " "The queue is identified by I. For details of the construction of " "I, see B(7)." msgstr "" "B() は、新しい POSIX メッセージキューを作成するか、既存のキューを " "オープンする。キューは I で識別される。 I の構成の詳細については " "B を参照。" #. type: Plain text #: build/C/man3/mq_open.3:58 msgid "" "The I argument specifies flags that control the operation of the " "call. (Definitions of the flags values can be obtained by including " "Ifcntl.hE>.) Exactly one of the following must be specified in " "I:" msgstr "" "I 引き数には、関数呼び出しの操作を制御するフラグを指定する (oflag の値" "の定義は Ifcntl.hE> のインクルードにより得られる)。 I には、" "以下のうちいずれか一つを必ず指定しなければならない。" #. type: TP #: build/C/man3/mq_open.3:58 #, no-wrap msgid "B" msgstr "B" #. type: Plain text #: build/C/man3/mq_open.3:61 msgid "Open the queue to receive messages only." msgstr "メッセージの受信専用としてキューをオープンする。" #. type: TP #: build/C/man3/mq_open.3:61 #, no-wrap msgid "B" msgstr "B" #. type: Plain text #: build/C/man3/mq_open.3:64 msgid "Open the queue to send messages only." msgstr "メッセージの送信専用としてキューをオープンする。" #. type: TP #: build/C/man3/mq_open.3:64 #, no-wrap msgid "B" msgstr "B" #. type: Plain text #: build/C/man3/mq_open.3:67 msgid "Open the queue to both send and receive messages." msgstr "メッセージの送受信両用としてキューをオープンする。" #. type: Plain text #: build/C/man3/mq_open.3:72 msgid "" "Zero or more of the following flags can additionally be Ied in I:" msgstr "" "0 個以上の下記のフラグを、ビット単位の OR (論理和) で I に追加で指定で" "きる。" #. type: TP #: build/C/man3/mq_open.3:72 #, no-wrap msgid "B" msgstr "B" #. type: Plain text #: build/C/man3/mq_open.3:81 msgid "" "Open the queue in nonblocking mode. In circumstances where B" "(3) and B(3) would normally block, these functions instead fail " "with the error B." msgstr "" "非停止 (nonblocking) モードでキューをオープンする。 B(3) と " "B(3) は、通常は停止 (block) する状況において、エラー B で失" "敗するようになる。" #. type: TP #: build/C/man3/mq_open.3:81 #, no-wrap msgid "B" msgstr "B" #. In reality the file system IDs are used on Linux. #. type: Plain text #: build/C/man3/mq_open.3:89 msgid "" "Create the message queue if it does not exist. The owner (user ID) of the " "message queue is set to the effective user ID of the calling process. The " "group ownership (group ID) is set to the effective group ID of the calling " "process." msgstr "" "存在しない場合、メッセージキューを作成する。 メッセージキューの所有者 (ユー" "ザ ID) とグループ所有権 (グループ ID) は、 それぞれ呼び出し元プロセスの実効" "ユーザ ID と実効グループ ID に設定される。" #. type: TP #: build/C/man3/mq_open.3:89 #, no-wrap msgid "B" msgstr "B" #. type: Plain text #: build/C/man3/mq_open.3:99 msgid "" "If B was specified in I, and a queue with the given I " "already exists, then fail with the error B." msgstr "" "B が I に指定され、かつ指定された名前 I を持つキューが" "すでに存在する場合、エラー B で失敗する。" #. type: Plain text #: build/C/man3/mq_open.3:123 msgid "" "If B is specified in I, then two additional arguments must " "be supplied. The I argument specifies the permissions to be placed on " "the new queue, as for B(2). (Symbolic definitions for the permissions " "bits can be obtained by including Isys/stat.hE>.) The permissions " "settings are masked against the process umask. The I argument " "specifies attributes for the queue. See B(3) for details. If " "I is NULL, then the queue is created with implementation-defined " "default attributes." msgstr "" "I に B を指定する場合、追加で 2つの引き数を与える必要があ" "る。 I 引き数は、新しいキューに適用される許可設定 (permission) を、 " "B(2) と同じように指定する (許可ビットのシンボル定義は Isys/stat." "hE> のインクルードにより得られる)。 許可設定はプロセスの umask でマスクさ" "れる。 I 引き数は、キューの属性を指定する。詳細は、 B(3) " "を参照。 I が NULL の場合、キューは実装で定義されたデフォルト属性で作成" "される。" #. type: Plain text #: build/C/man3/mq_open.3:135 msgid "" "On success, B() returns a message queue descriptor for use by " "other message queue functions. On error, B() returns I<(mqd_t)\\ " "-1>, with I set to indicate the error." msgstr "" "成功すると、 B() はメッセージキュー記述子 (message queue " "descriptor) を返す。 メッセージキュー記述子は他のメッセージキュー関連の関数で" "使用される。 エラーの場合、 B() は I<(mqd_t)\\ -1> を返し、 " "I にエラーを示す値を設定する。" #. type: TP #: build/C/man3/mq_open.3:136 build/C/man3/mq_open.3:140 #: build/C/man3/mq_unlink.3:51 build/C/man2/msgctl.2:253 #: build/C/man2/msgget.2:145 build/C/man2/msgop.2:304 build/C/man2/msgop.2:359 #, no-wrap msgid "B" msgstr "B" #. type: Plain text #: build/C/man3/mq_open.3:140 msgid "" "The queue exists, but the caller does not have permission to open it in the " "specified mode." msgstr "" "キューは存在するが、呼び出し元が指定されたモードでそのキュー をオープンする許" "可を持たない。" #. Note that this isn't consistent with the same case for sem_open() #. type: Plain text #: build/C/man3/mq_open.3:145 msgid "I contained more than one slash." msgstr "I にスラッシュが 2 個以上含まれていた。" #. type: TP #: build/C/man3/mq_open.3:145 build/C/man2/msgget.2:153 #, no-wrap msgid "B" msgstr "B" #. type: Plain text #: build/C/man3/mq_open.3:156 msgid "" "Both B and B were specified in I, but a queue with " "this I already exists." msgstr "" "I に B と B の両方が指定されたが、指定された名前 " "I を持つキューがすでに存在する。" #. type: Plain text #: build/C/man3/mq_open.3:188 msgid "" "B was specified in I, and I was not NULL, but Imq_maxmsg> or Imq_msqsize> was invalid. Both of these " "fields must be greater than zero. In a process that is unprivileged (does " "not have the B capability), Imq_maxmsg> must be " "less than or equal to the I limit, and Imq_msgsize> must " "be less than or equal to the I limit. In addition, even in a " "privileged process, Imq_maxmsg> cannot exceed the B " "limit. (See B(7) for details of these limits.)" msgstr "" "I に B が指定され、かつ I が NULL 以外だが、 Imq_maxmsg> か Imq_msqsize> が不正であった。 これらのフィール" "ドは両方とも 0 より大きくなければならない。 プロセスが特権を持たない " "(B ケーパビリティを持たない) 場合、 Imq_maxmsg> " "と Imq_msgsize> は、それぞれ上限 I、 I 以下" "でなければならない。 また、特権プロセスの場合でも、 Imq_maxmsg> " "は B 上限を超えることはできない。 (これらの上限に関する詳細は " "B(7) を参照。)" #. type: TP #: build/C/man3/mq_open.3:188 #, no-wrap msgid "B" msgstr "B" #. type: Plain text #: build/C/man3/mq_open.3:192 msgid "" "The process already has the maximum number of files and message queues open." msgstr "" "そのプロセスがオープンしているファイルとメッセージキューの数が プロセス毎の上" "限に達している。" #. type: TP #: build/C/man3/mq_open.3:192 build/C/man3/mq_unlink.3:54 #, no-wrap msgid "B" msgstr "B" #. type: Plain text #: build/C/man3/mq_open.3:196 build/C/man3/mq_unlink.3:58 msgid "I was too long." msgstr "I が長過ぎる。" #. type: TP #: build/C/man3/mq_open.3:196 #, no-wrap msgid "B" msgstr "B" #. type: Plain text #: build/C/man3/mq_open.3:200 msgid "" "The system limit on the total number of open files and message queues has " "been reached." msgstr "" "システム全体でオープンしているファイルとメッセージキューの合計数が システム上" "限に達している。" #. type: TP #: build/C/man3/mq_open.3:200 build/C/man3/mq_open.3:209 #: build/C/man3/mq_unlink.3:58 build/C/man2/msgget.2:163 #, no-wrap msgid "B" msgstr "B" #. type: Plain text #: build/C/man3/mq_open.3:209 msgid "" "The B flag was not specified in I, and no queue with this " "I exists." msgstr "" "B フラグが I に指定されなかったが、指定された名前 I を" "持つキューが存在しない。" #. Note that this isn't consistent with the same case for sem_open() #. type: Plain text #: build/C/man3/mq_open.3:214 msgid "I was just \"/\" followed by no other characters." msgstr "I が \"/\" だけで、その後ろに他の文字が続いていなかった。" #. type: TP #: build/C/man3/mq_open.3:217 build/C/man2/msgget.2:175 #, no-wrap msgid "B" msgstr "B" #. type: Plain text #: build/C/man3/mq_open.3:224 msgid "" "Insufficient space for the creation of a new message queue. This probably " "occurred because the I limit was encountered; see B" "(7)." msgstr "" "新しいメッセージキューを作成するのに十分な空間がない。 このエラーはおそらく " "I 上限に抵触したため起こったのだろう。 B(7) を参" "照。" #. type: SH #: build/C/man3/mq_open.3:226 build/C/man2/msgget.2:209 #, no-wrap msgid "BUGS" msgstr "バグ" #. type: Plain text #: build/C/man3/mq_open.3:230 msgid "" "In kernels before 2.6.14, the process umask was not applied to the " "permissions specified in I." msgstr "" "2.6.14 より前のカーネルには、 プロセスの umask が I で指定された許可設" "定に適用されなかった。" #. type: Plain text #: build/C/man3/mq_open.3:238 msgid "" "B(3), B(3), B(3), B(3), " "B(3), B(3), B(7)" msgstr "" "B(3), B(3), B(3), B(3), " "B(3), B(3), B(7)" #. type: TH #: build/C/man7/mq_overview.7:26 #, no-wrap msgid "MQ_OVERVIEW" msgstr "MQ_OVERVIEW" #. type: TH #: build/C/man7/mq_overview.7:26 #, no-wrap msgid "2009-09-27" msgstr "2009-09-27" #. type: Plain text #: build/C/man7/mq_overview.7:29 msgid "mq_overview - Overview of POSIX message queues" msgstr "mq_overview - POSIX メッセージキューの概要" #. type: Plain text #: build/C/man7/mq_overview.7:37 msgid "" "POSIX message queues allow processes to exchange data in the form of " "messages. This API is distinct from that provided by System V message " "queues (B(2), B(2), B(2), etc.), but provides " "similar functionality." msgstr "" "POSIX メッセージキューを使用すると、プロセス間で メッセージの形でのデータのや" "り取りを行うことができる。 この API は System V メッセージキューの API " "(B(2), B(2), B(2) など) とは異なるものだが、同様の機" "能を提供する。" #. type: Plain text #: build/C/man7/mq_overview.7:52 msgid "" "Message queues are created and opened using B(3); this function " "returns a I (I), which is used to refer to " "the open message queue in later calls. Each message queue is identified by " "a name of the form I; that is, a null-terminated string of up to " "B (i.e., 255) characters consisting of an initial slash, followed " "by one or more characters, none of which are slashes. Two processes can " "operate on the same queue by passing the same name to B(3)." msgstr "" "メッセージキューの作成とオープンは B(3) を使って行う。この関数は I<" "メッセージキュー記述子 (message queue descriptor)> (I) を返す。これ以" "降のコールでは、オープンされたメッセージキューは I<メッセージキュー記述子> を" "使って参照される。 各メッセージキューは I の形の名前で区別すること" "ができる。 その名前は、最大で B (すなわち 255) 文字の NULL 終端され" "た文字列で、 スラッシュで始まり、スラッシュ以外の文字が 1 文字以上続く形式で" "ある。 B(3) に同じ名前を渡すことで、2つのプロセスで同一のキューを " "操作することができる。" #. type: Plain text #: build/C/man7/mq_overview.7:68 msgid "" "Messages are transferred to and from a queue using B(3) and " "B(3). When a process has finished using the queue, it closes it " "using B(3), and when the queue is no longer required, it can be " "deleted using B(3). Queue attributes can be retrieved and (in " "some cases) modified using B(3) and B(3). A " "process can request asynchronous notification of the arrival of a message on " "a previously empty queue using B(3)." msgstr "" "メッセージのキューへの送受信は B(3) と B(3) を使って行" "う。プロセスがキューの使用を終えるときには、 B(3) を使ってキューを" "クローズする。キューがもはや不要となった場合には、 B(3) を使って" "キューを削除できる。キューの属性は B(3) で取得でき、 (制限はある" "が) B(3) で変更できる。 B(3) を使うことで、空の" "キューへのメッセージ到着を非同期で 通知するように要求することもできる。" #. type: Plain text #: build/C/man7/mq_overview.7:81 msgid "" "A message queue descriptor is a reference to an I (cf. B(2)). After a B(2), a child inherits copies " "of its parent's message queue descriptors, and these descriptors refer to " "the same open message queue descriptions as the corresponding descriptors in " "the parent. Corresponding descriptors in the two processes share the flags " "(I) that are associated with the open message queue description." msgstr "" "メッセージキュー記述子は I<オープンメッセージキュー記述 (open message queue " "description)> への参照である (B(2) も参照)。 B(2) 実行後は、子" "プロセスは親プロセスのメッセージキュー記述子のコピーを継承する。 これらの記述" "子は、親プロセスの対応する記述子と同じオープンメッセージキュー 記述を参照して" "いる。親プロセスと子プロセスの対応する記述子は、フラグ (I) を共有" "する。なぜなら、フラグはオープンメッセージキュー記述に 関連付けられているから" "である。" #. type: Plain text #: build/C/man7/mq_overview.7:94 msgid "" "Each message has an associated I, and messages are always " "delivered to the receiving process highest priority first. Message " "priorities range from 0 (low) to I " "(high). On Linux, I returns 32768, but " "POSIX.1-2001 only requires an implementation to support priorities in the " "range 0 to 31; some implementations only provide this range." msgstr "" "各メッセージにはそれぞれ I<優先度 (priority)> があり、メッセージの受信プロセ" "スへの配送は常に 優先度の高いメッセージから順に行われる。 メッセージの優先度" "は 0 (低優先) から I (高優先) の値を持つ。 " "Linux では、 I は 32768 を返すが、 POSIX.1-2001 で" "要求されているのは 0 から 31 までの優先度を 実装することだけであり、実装に" "よってはこの範囲の優先度しか 対応していない。" #. type: Plain text #: build/C/man7/mq_overview.7:97 msgid "" "The remainder of this section describes some specific details of the Linux " "implementation of POSIX message queues." msgstr "" "この節の残りでは、POSIX メッセージキューの Linux の実装の詳細 について説明す" "る。" #. type: SS #: build/C/man7/mq_overview.7:97 #, no-wrap msgid "Library interfaces and system calls" msgstr "ライブラリインタフェースとシステムコール" #. type: Plain text #: build/C/man7/mq_overview.7:103 msgid "" "In most cases the B library interfaces listed above are implemented " "on top of underlying system calls of the same name. Deviations from this " "scheme are indicated in the following table:" msgstr "" "ほとんどの場合、上記の B ライブラリインタフェースは、同じ名前の下位層" "のシステムコールを 使って実装されている。この枠組みにあてはまらないものを 以" "下の表に示す。" #. type: tbl table #: build/C/man7/mq_overview.7:107 #, no-wrap msgid "Library interface\tSystem call\n" msgstr "Library interface\tSystem call\n" #. type: tbl table #: build/C/man7/mq_overview.7:108 #, no-wrap msgid "mq_close(3)\tclose(2)\n" msgstr "mq_close(3)\tclose(2)\n" #. type: tbl table #: build/C/man7/mq_overview.7:109 #, no-wrap msgid "mq_getattr(3)\tmq_getsetattr(2)\n" msgstr "mq_getattr(3)\tmq_getsetattr(2)\n" #. type: tbl table #: build/C/man7/mq_overview.7:110 #, no-wrap msgid "mq_notify(3)\tmq_notify(2)\n" msgstr "mq_notify(3)\tmq_notify(2)\n" #. type: tbl table #: build/C/man7/mq_overview.7:111 #, no-wrap msgid "mq_open(3)\tmq_open(2)\n" msgstr "mq_open(3)\tmq_open(2)\n" #. type: tbl table #: build/C/man7/mq_overview.7:112 #, no-wrap msgid "mq_receive(3)\tmq_timedreceive(2)\n" msgstr "mq_receive(3)\tmq_timedreceive(2)\n" #. type: tbl table #: build/C/man7/mq_overview.7:113 #, no-wrap msgid "mq_send(3)\tmq_timedsend(2)\n" msgstr "mq_send(3)\tmq_timedsend(2)\n" #. type: tbl table #: build/C/man7/mq_overview.7:114 #, no-wrap msgid "mq_setattr(3)\tmq_getsetattr(2)\n" msgstr "mq_setattr(3)\tmq_getsetattr(2)\n" #. type: tbl table #: build/C/man7/mq_overview.7:115 #, no-wrap msgid "mq_timedreceive(3)\tmq_timedreceive(2)\n" msgstr "mq_timedreceive(3)\tmq_timedreceive(2)\n" #. type: tbl table #: build/C/man7/mq_overview.7:116 #, no-wrap msgid "mq_timedsend(3)\tmq_timedsend(2)\n" msgstr "mq_timedsend(3)\tmq_timedsend(2)\n" #. type: tbl table #: build/C/man7/mq_overview.7:117 #, no-wrap msgid "mq_unlink(3)\tmq_unlink(2)\n" msgstr "mq_unlink(3)\tmq_unlink(2)\n" #. type: SS #: build/C/man7/mq_overview.7:120 #, no-wrap msgid "Versions" msgstr "バージョン" #. type: Plain text #: build/C/man7/mq_overview.7:123 msgid "" "POSIX message queues have been supported on Linux since kernel 2.6.6. Glibc " "support has been provided since version 2.3.4." msgstr "" "Linux では POSIX メッセージキューはカーネル 2.6.6 以降でサポートされている。 " "glibc ではバージョン 2.3.4 以降でサポートされている。" #. type: SS #: build/C/man7/mq_overview.7:123 #, no-wrap msgid "Kernel configuration" msgstr "カーネルの設定" #. type: Plain text #: build/C/man7/mq_overview.7:128 msgid "" "Support for POSIX message queues is configurable via the " "B kernel configuration option. This option is enabled " "by default." msgstr "" "POSIX メッセージキューのサポートは、カーネルの設定 (configuration) オプショ" "ン B で設定可能である。このオプションはデフォルトでは有" "効である。" #. type: SS #: build/C/man7/mq_overview.7:128 #, no-wrap msgid "Persistence" msgstr "持続性" #. type: Plain text #: build/C/man7/mq_overview.7:133 msgid "" "POSIX message queues have kernel persistence: if not removed by B" "(3), a message queue will exist until the system is shut down." msgstr "" "POSIX メッセージキューはカーネル内で保持される。 B(3) で削除され" "なければ、メッセージキューは システムがシャットダウンされるまで存在し続ける。" #. type: SS #: build/C/man7/mq_overview.7:133 #, no-wrap msgid "Linking" msgstr "リンク" #. type: Plain text #: build/C/man7/mq_overview.7:138 msgid "" "Programs using the POSIX message queue API must be compiled with I " "to link against the real-time library, I." msgstr "" "POSIX メッセージキュー API を使用したプログラムは I でコンパイルし、" "リアルタイムライブラリ I とリンクしなければならない。" #. type: SS #: build/C/man7/mq_overview.7:138 #, no-wrap msgid "/proc interfaces" msgstr "/proc インタフェース" #. type: Plain text #: build/C/man7/mq_overview.7:141 msgid "" "The following interfaces can be used to limit the amount of kernel memory " "consumed by POSIX message queues:" msgstr "" "以下のインタフェースを使って、POSIX メッセージキューが消費するカーネル メモリ" "の量を制限することができる。" #. type: TP #: build/C/man7/mq_overview.7:141 #, no-wrap msgid "I" msgstr "I" #. type: Plain text #: build/C/man7/mq_overview.7:162 msgid "" "This file can be used to view and change the ceiling value for the maximum " "number of messages in a queue. This value acts as a ceiling on the Imq_maxmsg> argument given to B(3). The default value for " "I is 10. The minimum value is 1 (10 in kernels before 2.6.28). " "The upper limit is B: I<(131072\\ /\\ sizeof(void\\ *))> (32768 on " "Linux/86). This limit is ignored for privileged processes " "(B), but the B ceiling is nevertheless imposed." msgstr "" "このファイルを使って、一つのキューに入れられるメッセージの最大数の 上限値を参" "照したり変更したりできる。この値は、 B(3) に渡す Imq_maxmsg> 引き数に対する上限値として機能する。 I のデフォルト" "値は 10 で、 最小値は 1 (2.6.28 より前のカーネルでは 10) である。 上限は「埋" "め込みの固定値」 (B) で I<(131072\\ /\\ sizeof(void\\ *))> " "(Linux/86 では 32768) である。 この上限は特権プロセス (B) " "では無視されるが、埋め込みの固定値による上限は どんな場合にでも適用される。" #. type: TP #: build/C/man7/mq_overview.7:162 #, no-wrap msgid "I" msgstr "I" #. type: Plain text #: build/C/man7/mq_overview.7:181 msgid "" "This file can be used to view and change the ceiling on the maximum message " "size. This value acts as a ceiling on the Imq_msgsize> argument " "given to B(3). The default value for I is 8192 " "bytes. The minimum value is 128 (8192 in kernels before 2.6.28). The upper " "limit for I is 1,048,576 (in kernels before 2.6.28, the upper " "limit was B; that is, 2,147,483,647 on Linux/86). This limit is " "ignored for privileged processes (B)." msgstr "" "このファイルを使って、メッセージの最大サイズの上限値を\t 参照したり変更したり" "できる。\t この値は、\t B(3)\t に渡す\t Imq_msgsize> 引き" "数に対する上限値として機能する。\t I のデフォルト値は 8192 バ" "イトで、 最小値は 128 (2.6.28 より前のカーネルでは 8192) である。 " "I の上限は 1,048,576 である (2.6.28 より前のカーネルでは、上限" "は B (Linux/86 では 2,147,483,647) であった)。 この上限は特権プロセ" "ス\t (B)\t では無視される。" #. type: TP #: build/C/man7/mq_overview.7:181 #, no-wrap msgid "I" msgstr "I" #. type: Plain text #: build/C/man7/mq_overview.7:191 msgid "" "This file can be used to view and change the system-wide limit on the number " "of message queues that can be created. Only privileged processes " "(B) can create new message queues once this limit has " "been reached. The default value for I is 256; it can be changed " "to any value in the range 0 to INT_MAX." msgstr "" "このファイルを使って、作成することができるメッセージキューの数に\t 対するシス" "テム全体での制限を参照したり変更したりできる。\t 一度この上限に達すると、新し" "いメッセージキューを作成できるのは\t 特権プロセス\t (B)\t " "だけとなる。\t I のデフォルト値は 256 であり、\t 0 から " "INT_MAX の範囲の任意の値に変更することができる。" #. type: SS #: build/C/man7/mq_overview.7:191 #, no-wrap msgid "Resource limit" msgstr "リソース制限" #. type: Plain text #: build/C/man7/mq_overview.7:198 msgid "" "The B resource limit, which places a limit on the amount of " "space that can be consumed by all of the message queues belonging to a " "process's real user ID, is described in B(2)." msgstr "" "リソース上限 B は、プロセスの実 UID に対応する全メッセージ" "キューが消費する メモリ空間の量に対して上限を設定する。 B(2) を参" "照。" #. type: SS #: build/C/man7/mq_overview.7:198 #, no-wrap msgid "Mounting the message queue file system" msgstr "メッセージキュー・ファイルシステムのマウント" #. type: Plain text #: build/C/man7/mq_overview.7:204 msgid "" "On Linux, message queues are created in a virtual file system. (Other " "implementations may also provide such a feature, but the details are likely " "to differ.) This file system can be mounted (by the superuser) using the " "following commands:" msgstr "" "Linux では、メッセージキューは仮想ファイルシステム内に作成される (他の実装で" "も同様の機能が提供されているものもあるが、 詳細は違っているだろう)。 以下のコ" "マンドを使うことで (スーパーユーザは) このファイルシステムをマウントできる:" #. type: Plain text #: build/C/man7/mq_overview.7:209 #, no-wrap msgid "" "#B< mkdir /dev/mqueue>\n" "#B< mount -t mqueue none /dev/mqueue>\n" msgstr "" "#B< mkdir /dev/mqueue>\n" "#B< mount -t mqueue none /dev/mqueue>\n" #. type: Plain text #: build/C/man7/mq_overview.7:213 msgid "The sticky bit is automatically enabled on the mount directory." msgstr "" "マウントしたディレクトリのスティッキービット (sticky bit) は 自動的にオンとな" "る。" #. type: Plain text #: build/C/man7/mq_overview.7:220 msgid "" "After the file system has been mounted, the message queues on the system can " "be viewed and manipulated using the commands usually used for files (e.g., " "B(1) and B(1))." msgstr "" "メッセージキュー・ファイルシステムのマウント後は、ファイルに対して 通常使うコ" "マンド (例えば B(1) や B(1)) を使って、システム上のメッセージキュー" "を表示したり 操作したりできる。" #. type: Plain text #: build/C/man7/mq_overview.7:223 msgid "" "The contents of each file in the directory consist of a single line " "containing information about the queue:" msgstr "" "ディレクトリ内の各ファイルの内容は 1行であり、 キューに関する情報が表示され" "る。" #. type: Plain text #: build/C/man7/mq_overview.7:228 #, no-wrap msgid "" "$B< cat /dev/mqueue/mymq>\n" "QSIZE:129 NOTIFY:2 SIGNO:0 NOTIFY_PID:8260\n" msgstr "" "$B< cat /dev/mqueue/mymq>\n" "QSIZE:129 NOTIFY:2 SIGNO:0 NOTIFY_PID:8260\n" #. type: Plain text #: build/C/man7/mq_overview.7:232 msgid "These fields are as follows:" msgstr "各フィールドの詳細は以下の通りである:" #. type: TP #: build/C/man7/mq_overview.7:232 #, no-wrap msgid "B" msgstr "B" #. type: Plain text #: build/C/man7/mq_overview.7:235 msgid "Number of bytes of data in all messages in the queue." msgstr "キューに入っている全メッセージの合計バイト数。" #. type: TP #: build/C/man7/mq_overview.7:235 #, no-wrap msgid "B" msgstr "B" #. type: Plain text #: build/C/man7/mq_overview.7:241 msgid "" "If this is nonzero, then the process with this PID has used B(3) " "to register for asynchronous message notification, and the remaining fields " "describe how notification occurs." msgstr "" "この値が 0 以外の場合、この値の PID を持つプロセスが B(3) を使っ" "て、非同期のメッセージ通知を行うように設定したことを示す。 どのように通知が行" "われるかは、以下のフィールドにより決定される。" #. type: TP #: build/C/man7/mq_overview.7:241 #, no-wrap msgid "B" msgstr "B" #. type: Plain text #: build/C/man7/mq_overview.7:251 msgid "" "Notification method: 0 is B; 1 is B; and 2 is " "B." msgstr "" "通知方法: 0 は B; 1 は B; 2 は B" #. type: TP #: build/C/man7/mq_overview.7:251 #, no-wrap msgid "B" msgstr "B" #. type: Plain text #: build/C/man7/mq_overview.7:255 msgid "Signal number to be used for B." msgstr "B に使用されるシグナル番号。" #. type: SS #: build/C/man7/mq_overview.7:255 #, no-wrap msgid "Polling message queue descriptors" msgstr "メッセージキュー記述子のポーリング" #. type: Plain text #: build/C/man7/mq_overview.7:263 msgid "" "On Linux, a message queue descriptor is actually a file descriptor, and can " "be monitored using B(2), B(2), B(7) を使って監視することができ" "る。 この機能の移植性はない。" #. type: Plain text #: build/C/man7/mq_overview.7:275 msgid "" "System V message queues (B(2), B(2), B(2), etc.) are " "an older API for exchanging messages between processes. POSIX message " "queues provide a better designed interface than System V message queues; on " "the other hand POSIX message queues are less widely available (especially on " "older systems) than System V message queues." msgstr "" "System V メッセージキュー (B(2), B(2), B(2) など) は" "プロセス間でメッセージをやり取りするための古い API である。 POSIX メッセージ" "キューは System V メッセージキューよりもうまく 設計されたインタフェースを提供" "している。 一方で、POSIX メッセージキューは System V メッセージキューと比べる" "と 利用できるシステムが少ない (特に、古いシステムでは少ない)。" #. type: Plain text #: build/C/man7/mq_overview.7:278 msgid "" "Linux does not currently (2.6.26) support the use of access control lists " "(ACLs) for POSIX message queues." msgstr "" "現在のことろ (バージョン 2.6.26 時点)、 Linux は POSIX メッセージキューに対す" "るアクセス制御リスト (ACL) に 対応していない。" #. type: Plain text #: build/C/man7/mq_overview.7:281 msgid "" "An example of the use of various message queue functions is shown in " "B(3)." msgstr "" "各種のメッセージキュー関数を使用した例が B(3) に記載されている。" #. type: Plain text #: build/C/man7/mq_overview.7:294 msgid "" "B(2), B(2), B(2), B(2), B" "(3), B(3), B(3), B(3), B(3), " "B(3), B(3), B(7)" #. type: TH #: build/C/man3/mq_receive.3:26 #, no-wrap msgid "MQ_RECEIVE" msgstr "MQ_RECEIVE" #. type: TH #: build/C/man3/mq_receive.3:26 build/C/man3/mq_send.3:26 #, no-wrap msgid "2010-09-20" msgstr "2010-09-20" #. type: Plain text #: build/C/man3/mq_receive.3:29 msgid "mq_receive, mq_timedreceive - receive a message from a message queue" msgstr "mq_receive, mq_timedreceive - メッセージキューからメッセージを受信する" #. type: Plain text #: build/C/man3/mq_receive.3:35 #, no-wrap msgid "" "BIB<, char *>IB<,>\n" "B< size_t >IB<, unsigned *>IB<);>\n" msgstr "" "BIB<, char *>IB<,>\n" "B< size_t >IB<, unsigned *>IB<);>\n" #. type: Plain text #: build/C/man3/mq_receive.3:38 build/C/man3/mq_send.3:38 #, no-wrap msgid "" "B<#include Etime.hE>\n" "B<#include Emqueue.hE>\n" msgstr "" "B<#include Etime.hE>\n" "B<#include Emqueue.hE>\n" #. type: Plain text #: build/C/man3/mq_receive.3:42 #, no-wrap msgid "" "BIB<, char *>IB<,>\n" "B< size_t >IB<, unsigned *>IB<,>\n" "B< const struct timespec *>IB<);>\n" msgstr "" "BIB<, char *>IB<,>\n" "B< size_t >IB<, unsigned *>IB<,>\n" "B< const struct timespec *>IB<);>\n" #. type: Plain text #: build/C/man3/mq_receive.3:50 build/C/man3/mq_send.3:50 msgid "" "Feature Test Macro Requirements for glibc (see B(7)):" msgstr "glibc 向けの機能検査マクロの要件 (B(7) 参照):" #. type: Plain text #: build/C/man3/mq_receive.3:53 msgid "B():" msgstr "B():" #. type: Plain text #: build/C/man3/mq_receive.3:55 build/C/man3/mq_send.3:55 msgid "_XOPEN_SOURCE\\ E=\\ 600 || _POSIX_C_SOURCE\\ E=\\ 200112L" msgstr "_XOPEN_SOURCE\\ E=\\ 600 || _POSIX_C_SOURCE\\ E=\\ 200112L" #. type: Plain text #: build/C/man3/mq_receive.3:76 msgid "" "B() removes the oldest message with the highest priority from " "the message queue referred to by the descriptor I, and places it in " "the buffer pointed to by I. The I argument specifies the " "size of the buffer pointed to by I; this must be greater than the " "I attribute of the queue (see B(3)). If I is " "not NULL, then the buffer to which it points is used to return the priority " "associated with the received message." msgstr "" "B() は、記述子 I で参照されるメッセージキューから最も高い" "優先度を持つ 最も古いメッセージを削除し、そのメッセージを I が指す" "バッファに格納する。 I 引き数は、 I が指すバッファの大きさ" "を示す。この値はキューの I 属性よりも大きくなければならない " "(B(3) 参照)。 I が NULL 以外の場合、 I が指すバッ" "ファに受信したメッセージの優先度が格納される。" #. type: Plain text #: build/C/man3/mq_receive.3:86 msgid "" "If the queue is empty, then, by default, B() blocks until a " "message becomes available, or the call is interrupted by a signal handler. " "If the B flag is enabled for the message queue description, then " "the call instead fails immediately with the error B." msgstr "" "キューが空の場合、デフォルトでは、 B() は、新しいメッセージが届" "くか、関数呼び出しがシグナルハンドラにより 中断されるまで、停止 (block) す" "る。 メッセージキュー記述 (message queue description) で B フラグ" "が有効になっている場合は、 B() はエラー B ですぐに失敗す" "る。" #. type: Plain text #: build/C/man3/mq_receive.3:99 msgid "" "B() behaves just like B(), except that if the " "queue is empty and the B flag is not enabled for the message " "queue description, then I points to a structure which specifies " "a ceiling on the time for which the call will block. This ceiling is an " "absolute timeout in seconds and nanoseconds since the Epoch, 1970-01-01 " "00:00:00 +0000 (UTC), and it is specified in the following structure:" msgstr "" "B() は B() と全く同じ動作をするが、 メッセージ" "キューが空で、メッセージキュー記述で B フラグが有効になっていない" "場合に、この呼び出しが停止する時間の上限を I が指す構造体で指定" "する点が異なる。この上限は、タイムアウトの時刻を、 時刻紀元 (Epoch; " "1970-01-01 00:00:00 +0000 (UTC)) からの経過時間 (秒とナノ秒の組) で指定する。" "タイムアウト時刻は以下の構造体で指定する:" #. type: Plain text #: build/C/man3/mq_receive.3:106 build/C/man3/mq_send.3:112 #, no-wrap msgid "" "struct timespec {\n" " time_t tv_sec; /* seconds */\n" " long tv_nsec; /* nanoseconds */\n" "};\n" msgstr "" "struct timespec {\n" " time_t tv_sec; /* 秒 */\n" " long tv_nsec; /* ナノ秒 */\n" "};\n" #. type: Plain text #: build/C/man3/mq_receive.3:113 msgid "" "If no message is available, and the timeout has already expired by the time " "of the call, B() returns immediately." msgstr "" "メッセージがキューになく、関数呼び出し時にすでにタイムアウト時刻が 過ぎている" "場合、 B() はすぐに返る。" #. type: Plain text #: build/C/man3/mq_receive.3:122 msgid "" "On success, B() and B() return the number of " "bytes in the received message; on error, -1 is returned, with I set " "to indicate the error." msgstr "" "成功すると、 B() と B() は受信したメッセージの" "バイト数を返す。 エラーの場合、-1 を返し、 I にエラーを示す値を設定す" "る。" #. type: TP #: build/C/man3/mq_receive.3:123 build/C/man3/mq_send.3:128 #: build/C/man2/msgop.2:310 build/C/man2/msgop.2:365 #, no-wrap msgid "B" msgstr "B" #. type: Plain text #: build/C/man3/mq_receive.3:129 msgid "" "The queue was empty, and the B flag was set for the message " "queue description referred to by I." msgstr "" "キューが空で、かつ I で参照されるメッセージキュー記述で B " "フラグがセットされていた。" #. type: Plain text #: build/C/man3/mq_receive.3:134 build/C/man3/mq_send.3:139 msgid "The descriptor specified in I was invalid." msgstr "I で指定された記述子が不正である。" #. type: TP #: build/C/man3/mq_receive.3:134 build/C/man3/mq_send.3:139 #: build/C/man2/msgop.2:326 build/C/man2/msgop.2:380 #, no-wrap msgid "B" msgstr "B" #. type: Plain text #: build/C/man3/mq_receive.3:138 build/C/man3/mq_send.3:143 msgid "The call was interrupted by a signal handler; see B(7)." msgstr "関数呼び出しがシグナルハンドラにより中断された。 B(7) 参照。" #. type: Plain text #: build/C/man3/mq_receive.3:147 build/C/man3/mq_send.3:152 msgid "" "The call would have blocked, and I was invalid, either because " "I was less than zero, or because I was less than zero or " "greater than 1000 million." msgstr "" "関数呼び出しは停止するはずであったが、 I が不正であった。 " "I が不正とは、 I が 0 未満、もしくは I が 0 未" "満か 1,000,000,000 より大きい、ということである。" #. type: TP #: build/C/man3/mq_receive.3:147 build/C/man3/mq_send.3:152 #, no-wrap msgid "B" msgstr "B" #. type: Plain text #: build/C/man3/mq_receive.3:153 msgid "" "I was less than the I attribute of the message queue." msgstr "I がメッセージキューの I 属性よりも小さかった。" #. type: TP #: build/C/man3/mq_receive.3:153 build/C/man3/mq_send.3:158 #, no-wrap msgid "B" msgstr "B" #. type: Plain text #: build/C/man3/mq_receive.3:156 build/C/man3/mq_send.3:161 msgid "The call timed out before a message could be transferred." msgstr "メッセージが転送される前に関数呼び出しがタイムアウトした。" #. type: Plain text #: build/C/man3/mq_receive.3:164 msgid "" "On Linux, B() is a system call, and B() is a " "library function layered on top of that system call." msgstr "" "Linux では、 B() はシステムコールである。 B() " "はライブラリ関数で、 B() システムコールを用いて実装されてい" "る。" #. type: Plain text #: build/C/man3/mq_receive.3:173 msgid "" "B(3), B(3), B(3), B(3), B" "(3), B(3), B(7), B