OSDN Git Service

(split) LDP: Update the version to 3.53 in PO files
[linuxjm/LDP_man-pages.git] / draft / man3 / mq_open.3
index 07e27cd..ce88b6e 100644 (file)
@@ -1,8 +1,7 @@
-'\" t
-.\" Hey Emacs! This file is -*- nroff -*- source.
-.\"
+.\" t
 .\" Copyright (C) 2006 Michael Kerrisk <mtk.manpages@gmail.com>
 .\"
+.\" %%%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.
 .\"
 .\" Formatted or processed versions of this manual, if unaccompanied by
 .\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\"*******************************************************************
 .\"
-.\" Japanese Version Copyright (c) 2006 Akihiro MOTOKI all rights reserved.
-.\" Translated 2006-04-23, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\" This file was generated with po4a. Translate the source file.
 .\"
-.TH MQ_OPEN 3 2009-02-20 "Linux" "Linux Programmer's Manual"
-.\"O .SH NAME
+.\"*******************************************************************
+.TH MQ_OPEN 3 2009\-02\-20 Linux "Linux Programmer's Manual"
 .SH 名前
-.\"O mq_open \- open a message queue
 mq_open \- メッセージキューをオープンする
-.\"O .SH SYNOPSIS
 .SH 書式
 .nf
-.BR "#include <fcntl.h>" "           /* For O_* constants */"
-.BR "#include <sys/stat.h>" "        /* For mode constants */"
-.B #include <mqueue.h>
+\fB#include <fcntl.h>\fP           /* For O_* constants */
+\fB#include <sys/stat.h>\fP        /* For mode constants */
+\fB#include <mqueue.h>\fP
 .sp
-.BI "mqd_t mq_open(const char *" name ", int " oflag );
-.BI "mqd_t mq_open(const char *" name ", int " oflag ", mode_t " mode ,
-.BI "              struct mq_attr *" attr );
+\fBmqd_t mq_open(const char *\fP\fIname\fP\fB, int \fP\fIoflag\fP\fB);\fP
+\fBmqd_t mq_open(const char *\fP\fIname\fP\fB, int \fP\fIoflag\fP\fB, mode_t \fP\fImode\fP\fB,\fP
+\fB              struct mq_attr *\fP\fIattr\fP\fB);\fP
 .fi
 .sp
-.\"O Link with \fI\-lrt\fP.
 \fI\-lrt\fP でリンクする。
-.\"O .SH DESCRIPTION
 .SH 説明
-.\"O .BR mq_open ()
-.\"O creates a new POSIX message queue or opens an existing queue.
-.\"O The queue is identified by
-.\"O .IR name .
-.\"O For details of the construction of
-.\"O .IR name ,
-.\"O see
-.\"O .BR mq_overview (7).
-.BR mq_open ()
-は、新しい POSIX メッセージキューを作成するか、既存のキューを
-オープンする。キューは
-.I name
-で識別される。
-.I name
-の構成の詳細については
-.B mq_overview (7)
-を参照。
+\fBmq_open\fP()  は、新しい POSIX メッセージキューを作成するか、既存のキューを オープンする。キューは \fIname\fP で識別される。
+\fIname\fP の構成の詳細については \fBmq_overview (7)\fP を参照。
 
-.\"O The
-.\"O .I oflag
-.\"O argument specifies flags that control the operation of the call.
-.\"O (Definitions of the flags values can be obtained by including
-.\"O .IR <fcntl.h> .)
-.\"O Exactly one of the following must be specified in
-.\"O .IR oflag :
-.I oflag
-引き数には、関数呼び出しの操作を制御するフラグを指定する
-(oflag の値の定義は
-.I <fcntl.h>
-のインクルードにより得られる)。
-.I oflag
-には、以下のうちいずれか一つを必ず指定しなければならない。
-.TP
-.B O_RDONLY
-.\"O Open the queue to receive messages only.
+\fIoflag\fP 引き数には、関数呼び出しの操作を制御するフラグを指定する (oflag の値の定義は \fI<fcntl.h>\fP
+のインクルードにより得られる)。 \fIoflag\fP には、以下のうちいずれか一つを必ず指定しなければならない。
+.TP 
+\fBO_RDONLY\fP
 メッセージの受信専用としてキューをオープンする。
-.TP
-.B O_WRONLY
-.\"O Open the queue to send messages only.
+.TP 
+\fBO_WRONLY\fP
 メッセージの送信専用としてキューをオープンする。
-.TP
-.B O_RDWR
-.\"O Open the queue to both send and receive messages.
+.TP 
+\fBO_RDWR\fP
 メッセージの送受信両用としてキューをオープンする。
 .PP
-.\"O Zero or more of the following flags can additionally be
-.\"O .IR OR ed
-.\"O in
-.\"O .IR oflag :
-0 個以上の下記のフラグを、ビット単位の OR (論理和) で
-.I oflag
-に追加で指定できる。
-.TP
-.B O_NONBLOCK
-.\"O Open the queue in nonblocking mode.
-.\"O In circumstances where
-.\"O .BR mq_receive (3)
-.\"O and
-.\"O .BR mq_send (3)
-.\"O would normally block, these functions instead fail with the error
-.\"O .BR EAGAIN .
-非停止 (nonblocking) モードでキューをオープンする。
-.BR mq_receive (3)
-と
-.BR mq_send (3)
-は、通常は停止 (block) する状況において、エラー
-.B EAGAIN
-で失敗するようになる。
-.TP
-.B O_CREAT
-.\"O Create the message queue if it does not exist.
-.\"O The owner (user ID) of the message queue is set to the effective
-.\"O user ID of the calling process.
-.\"O The group ownership (group ID) is set to the effective group ID
-.\"O of the calling process.
-.\"O .\" In reality the file system IDs are used on Linux.
-存在しない場合、メッセージキューを作成する。
-メッセージキューの所有者 (ユーザ ID) とグループ所有権 (グループ ID) は、
+0 個以上の下記のフラグを、ビット単位の OR (論理和) で \fIoflag\fP に追加で指定できる。
+.TP 
+\fBO_NONBLOCK\fP
+非停止 (nonblocking) モードでキューをオープンする。 \fBmq_receive\fP(3)  と \fBmq_send\fP(3)  は、通常は停止
+(block) する状況において、エラー \fBEAGAIN\fP で失敗するようになる。
+.TP 
+\fBO_CREAT\fP
+.\" In reality the file system IDs are used on Linux.
+存在しない場合、メッセージキューを作成する。 メッセージキューの所有者 (ユーザ ID) とグループ所有権 (グループ ID) は、
 それぞれ呼び出し元プロセスの実効ユーザ ID と実効グループ ID に設定される。
-.\" 実際は、Linux ではファイルシステム ID が使用される。
-.TP
-.B O_EXCL
-.\"O If
-.\"O .B O_CREAT
-.\"O was specified in
-.\"O .IR oflag ,
-.\"O and a queue with the given
-.\"O .I name
-.\"O already exists, then fail with the error
-.\"O .BR EEXIST .
-.B O_CREAT
-が
-.I oflag
-に指定され、かつ指定された名前
-.I name
-を持つキューがすでに存在する場合、エラー
-.B EEXIST
+.TP 
+\fBO_EXCL\fP
+\fBO_CREAT\fP が \fIoflag\fP に指定され、かつ指定された名前 \fIname\fP を持つキューがすでに存在する場合、エラー \fBEEXIST\fP
 で失敗する。
 .PP
-.\"O If
-.\"O .B O_CREAT
-.\"O is specified in
-.\"O .IR oflag ,
-.\"O then two additional arguments must be supplied.
-.I oflag
-に
-.B O_CREAT
-を指定する場合、追加で 2つの引き数を与える必要がある。
-.\"O The
-.\"O .I mode
-.\"O argument specifies the permissions to be placed on the new queue,
-.\"O as for
-.\"O .BR open (2).
-.\"O (Symbolic definitions for the permissions bits can be obtained by including
-.\"O .IR <sys/stat.h> .)
-.\"O The permissions settings are masked against the process umask.
-.I mode
-引き数は、新しいキューに適用される許可設定 (permission) を、
-.BR open (2)
-と同じように指定する
-(許可ビットのシンボル定義は
-.I <sys/stat.h>
-のインクルードにより得られる)。
-許可設定はプロセスの umask でマスクされる。
-.\"O The
-.\"O .I attr
-.\"O argument specifies attributes for the queue.
-.\"O See
-.\"O .BR mq_getattr (3)
-.\"O for details.
-.\"O If
-.\"O .I attr
-.\"O is NULL, then the queue is created with implementation-defined
-.\"O default attributes.
-.I attr
-引き数は、キューの属性を指定する。詳細は、
-.BR mq_getattr (3)
-を参照。
-.I attr
-が NULL の場合、キューは実装で定義されたデフォルト属性で作成される。
-.\"O .SH RETURN VALUE
+\fIoflag\fP に \fBO_CREAT\fP を指定する場合、追加で 2つの引き数を与える必要がある。 \fImode\fP
+引き数は、新しいキューに適用される許可設定 (permission) を、 \fBopen\fP(2)  と同じように指定する (許可ビットのシンボル定義は
+\fI<sys/stat.h>\fP のインクルードにより得られる)。 許可設定はプロセスの umask でマスクされる。 \fIattr\fP
+引き数は、キューの属性を指定する。詳細は、 \fBmq_getattr\fP(3)  を参照。 \fIattr\fP が NULL
+の場合、キューは実装で定義されたデフォルト属性で作成される。
 .SH 返り値
-.\"O On success,
-.\"O .BR mq_open ()
-.\"O returns a message queue descriptor for use by other
-.\"O message queue functions.
-成功すると、
-.BR mq_open ()
-はメッセージキュー記述子 (message queue descriptor) を返す。
-メッセージキュー記述子は他のメッセージキュー関連の関数で使用される。
-.\"O On error,
-.\"O .BR mq_open ()
-.\"O returns
-.\"O .IR "(mqd_t)\ \-1",
-.\"O with
-.\"O .I errno
-.\"O set to indicate the error.
-エラーの場合、
-.BR mq_open ()
-は
-.I "(mqd_t)\ \-1"
-を返し、
-.I errno
-にエラーを示す値を設定する。
-.\"O .SH ERRORS
+成功すると、 \fBmq_open\fP()  はメッセージキュー記述子 (message queue descriptor) を返す。
+メッセージキュー記述子は他のメッセージキュー関連の関数で使用される。 エラーの場合、 \fBmq_open\fP()  は \fI(mqd_t)\ \-1\fP
+を返し、 \fIerrno\fP にエラーを示す値を設定する。
 .SH エラー
-.TP
-.B EACCES
-.\"O The queue exists, but the caller does not have permission to
-.\"O open it in the specified mode.
-キューは存在するが、呼び出し元が指定されたモードでそのキュー
-をオープンする許可を持たない。
-.TP
-.B EACCES
-.\"O .I name
-.\"O contained more than one slash.
-.I name
-にスラッシュが 2 個以上含まれていた。
+.TP 
+\fBEACCES\fP
+キューは存在するが、呼び出し元が指定されたモードでそのキュー をオープンする許可を持たない。
+.TP 
+\fBEACCES\fP
 .\" Note that this isn't consistent with the same case for sem_open()
-.TP
-.B EEXIST
-.\"O Both
-.\"O .B O_CREAT
-.\"O and
-.\"O .B O_EXCL
-.\"O were specified in
-.\"O .IR oflag ,
-.\"O but a queue with this
-.\"O .I name
-.\"O already exists.
-.I oflag
-に
-.B O_CREAT
-と
-.B O_EXCL
-の両方が指定されたが、指定された名前
-.I name
-を持つキューがすでに存在する。
-.TP
-.B EINVAL
-.\"O .B O_CREAT
-.\"O was specified in
-.\"O .IR oflag ,
-.\"O and
-.\"O .I attr
-.\"O was not NULL, but
-.\"O .I attr\->mq_maxmsg
-.\"O or
-.\"O .I attr\->mq_msqsize
-.\"O was invalid.
-.\"O Both of these fields must be greater than zero.
-.I oflag
-に
-.B O_CREAT
-が指定され、かつ
-.I attr
-が NULL 以外だが、
-.I attr\->mq_maxmsg
-か
-.I attr\->mq_msqsize
-が不正であった。
-これらのフィールドは両方とも 0 より大きくなければならない。
-.\"O In a process that is unprivileged (does not have the
-.\"O .B CAP_SYS_RESOURCE
-.\"O capability),
-.\"O .I attr\->mq_maxmsg
-.\"O must be less than or equal to the
-.\"O .I msg_max
-.\"O limit, and
-.\"O .I attr\->mq_msgsize
-.\"O must be less than or equal to the
-.\"O .I msgsize_max
-.\"O limit.
-.\"O In addition, even in a privileged process,
-.\"O .I attr\->mq_maxmsg
-.\"O cannot exceed the
-.\"O .B HARD_MAX
-.\"O limit.
-.\"O (See
-.\"O .BR mq_overview (7)
-.\"O for details of these limits.)
-プロセスが特権を持たない
-.RB ( CAP_SYS_RESOURCE
-ケーパビリティを持たない) 場合、
-.I attr\->mq_maxmsg
-と
-.I attr\->mq_msgsize
-は、それぞれ上限
-.IR msg_max 、
-.I msgsize_max
-以下でなければならない。
-また、特権プロセスの場合でも、
-.I attr\->mq_maxmsg
-は
-.B HARD_MAX
-上限を超えることはできない。
-(これらの上限に関する詳細は
-.BR mq_overview (7)
-を参照。)
-.TP
-.B EMFILE
-.\"O The process already has the maximum number of files and
-.\"O message queues open.
-そのプロセスがオープンしているファイルとメッセージキューの数が
-プロセス毎の上限に達している。
-.TP
-.B ENAMETOOLONG
-.\"O .I name
-.\"O was too long.
-.I name
-が長すぎる。
-.TP
-.B ENFILE
-.\"O The system limit on the total number of open files and message queues
-.\"O has been reached.
-システム全体でオープンしているファイルとメッセージキューの合計数が
-システム上限に達している。
-.TP
-.B ENOENT
-.\"O The
-.\"O .B O_CREAT
-.\"O flag was not specified in
-.\"O .IR oflag ,
-.\"O and no queue with this
-.\"O .I name
-.\"O exists.
-.B O_CREAT
-フラグが
-.I oflag
-に指定されなかったが、指定された名前
-.I name
-を持つキューが存在しない。
-.TP
-.B ENOENT
-.\"O .I name
-.\"O was just "/" followed by no other characters.
-.I name
-が "/" だけで、その後ろに他の文字が続いていなかった。
+\fIname\fP にスラッシュが 2 個以上含まれていた。
+.TP 
+\fBEEXIST\fP
+\fIoflag\fP に \fBO_CREAT\fP と \fBO_EXCL\fP の両方が指定されたが、指定された名前 \fIname\fP を持つキューがすでに存在する。
+.TP 
+\fBEINVAL\fP
+\fIoflag\fP に \fBO_CREAT\fP が指定され、かつ \fIattr\fP が NULL 以外だが、 \fIattr\->mq_maxmsg\fP か
+\fIattr\->mq_msqsize\fP が不正であった。 これらのフィールドは両方とも 0 より大きくなければならない。
+プロセスが特権を持たない (\fBCAP_SYS_RESOURCE\fP ケーパビリティを持たない) 場合、 \fIattr\->mq_maxmsg\fP と
+\fIattr\->mq_msgsize\fP は、それぞれ上限 \fImsg_max\fP、 \fImsgsize_max\fP 以下でなければならない。
+また、特権プロセスの場合でも、 \fIattr\->mq_maxmsg\fP は \fBHARD_MAX\fP 上限を超えることはできない。
+(これらの上限に関する詳細は \fBmq_overview\fP(7)  を参照。)
+.TP 
+\fBEMFILE\fP
+そのプロセスがオープンしているファイルとメッセージキューの数が プロセス毎の上限に達している。
+.TP 
+\fBENAMETOOLONG\fP
+\fIname\fP が長過ぎる。
+.TP 
+\fBENFILE\fP
+システム全体でオープンしているファイルとメッセージキューの合計数が システム上限に達している。
+.TP 
+\fBENOENT\fP
+\fBO_CREAT\fP フラグが \fIoflag\fP に指定されなかったが、指定された名前 \fIname\fP を持つキューが存在しない。
+.TP 
+\fBENOENT\fP
 .\" Note that this isn't consistent with the same case for sem_open()
-.TP
-.B ENOMEM
-.\"O Insufficient memory.
+\fIname\fP が "/" だけで、その後ろに他の文字が続いていなかった。
+.TP 
+\fBENOMEM\fP
 十分なメモリがない。
-.TP
-.B ENOSPC
-.\"O Insufficient space for the creation of a new message queue.
-.\"O This probably occurred because the
-.\"O .I queues_max
-.\"O limit was encountered; see
-.\"O .BR mq_overview (7).
-新しいメッセージキューを作成するのに十分な空間がない。
-このエラーはおそらく
-.I queues_max
-上限に抵触したため起こったのだろう。
-.BR mq_overview (7)
-を参照。
-.\"O .SH CONFORMING TO
+.TP 
+\fBENOSPC\fP
+新しいメッセージキューを作成するのに十分な空間がない。 このエラーはおそらく \fIqueues_max\fP 上限に抵触したため起こったのだろう。
+\fBmq_overview\fP(7)  を参照。
 .SH 準拠
-POSIX.1-2001.
-.\"O .SH BUGS
+POSIX.1\-2001.
 .SH バグ
-.\"O In kernels before 2.6.14,
-.\"O the process umask was not applied to the permissions specified in
-.\"O .IR mode .
-2.6.14 より前のカーネルには、
-プロセスの umask が
-.I mode
-で指定された許可設定に適用されなかった。
-.\"O .SH "SEE ALSO"
+2.6.14 より前のカーネルには、 プロセスの umask が \fImode\fP で指定された許可設定に適用されなかった。
 .SH 関連項目
-.BR mq_close (3),
-.BR mq_getattr (3),
-.BR mq_notify (3),
-.BR mq_receive (3),
-.BR mq_send (3),
-.BR mq_unlink (3),
-.BR mq_overview (7)
+\fBmq_close\fP(3), \fBmq_getattr\fP(3), \fBmq_notify\fP(3), \fBmq_receive\fP(3),
+\fBmq_send\fP(3), \fBmq_unlink\fP(3), \fBmq_overview\fP(7)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.53 の一部
+である。プロジェクトの説明とバグ報告に関する情報は
+http://www.kernel.org/doc/man\-pages/ に書かれている。