OSDN Git Service

(split) LDP: draft snapshot generated from latest ja.po files.
[linuxjm/LDP_man-pages.git] / draft / man3 / sem_open.3
index fae839e..22e48b7 100644 (file)
@@ -1,4 +1,4 @@
-'\" t
+.\" t
 .\" Hey Emacs! This file is -*- nroff -*- source.
 .\"
 .\" Copyright (C) 2006 Michael Kerrisk <mtk.manpages@gmail.com>
 .\" Formatted or processed versions of this manual, if unaccompanied by
 .\" the source, must acknowledge the copyright and authors of this work.
 .\"
-.\" Japanese Version Copyright (c) 2006 Akihiro MOTOKI all rights reserved.
-.\" Translated 2006-04-18, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
-.\" Updated 2009-02-23, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>, LDP v3.19
+.\"*******************************************************************
 .\"
-.TH SEM_OPEN 3 2009-02-20 "Linux" "Linux Programmer's Manual"
-.\"O .SH NAME
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.TH SEM_OPEN 3 2009\-02\-20 Linux "Linux Programmer's Manual"
 .SH 名前
-.\"O sem_open \- initialize and open a named semaphore
 sem_open \- 名前付きセマフォを初期化し、オープンする
-.\"O .SH SYNOPSIS
 .SH 書式
 .nf
-.BR "#include <fcntl.h>" "           /* For O_* constants */"
-.BR "#include <sys/stat.h>" "        /* For mode constants */"
-.B #include <semaphore.h>
+\fB#include <fcntl.h>\fP           /* For O_* constants */
+\fB#include <sys/stat.h>\fP        /* For mode constants */
+\fB#include <semaphore.h>\fP
 .sp
-.BI "sem_t *sem_open(const char *" name ", int " oflag );
-.BI "sem_t *sem_open(const char *" name ", int " oflag ", "
-.BI "                mode_t " mode ", unsigned int " value );
+\fBsem_t *sem_open(const char *\fP\fIname\fP\fB, int \fP\fIoflag\fP\fB);\fP
+\fBsem_t *sem_open(const char *\fP\fIname\fP\fB, int \fP\fIoflag\fP\fB, \fP
+\fB                mode_t \fP\fImode\fP\fB, unsigned int \fP\fIvalue\fP\fB);\fP
 .fi
 .sp
-.\"O Link with \fI\-lrt\fP or \fI\-pthread\fP.
 \fI\-lrt\fP または \fI\-pthread\fP でリンクする。
-.\"O .SH DESCRIPTION
 .SH 説明
-.\"O .BR sem_open ()
-.\"O creates a new POSIX semaphore or opens an existing semaphore.
-.\"O The semaphore is identified by
-.\"O .IR name .
-.\"O For details of the construction of
-.\"O .IR name ,
-.\"O see
-.\"O .BR sem_overview (7).
-.BR sem_open ()
-は、新規の POSIX セマフォを作成するか、既存のセマフォのオープンを行う。
-セマフォは
-.I name
-で識別される。
-.I name
-の構成の詳細は
-.BR sem_overview (7)
-を参照。
+\fBsem_open\fP()  は、新規の POSIX セマフォを作成するか、既存のセマフォのオープンを行う。 セマフォは \fIname\fP で識別される。
+\fIname\fP の構成の詳細は \fBsem_overview\fP(7)  を参照。
 
-.\"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> .)
-.I oflag
-引き数には、
-.BR sem_open ()
-の動作を制御するフラグを指定する
-(oflag の値の定義は
-.I <fcntl.h>
-のインクルードにより得られる)。
-.\"O If
-.\"O .B O_CREAT
-.\"O is specified in
-.\"O .IR oflag ,
-.\"O then the semaphore is created if
-.\"O it does not already exist.
-.\"O The owner (user ID) of the semaphore 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.
-.I oflag
-に
-.B O_CREAT
-が指定されると、まだ存在しない場合にはそのセマフォが作成される。
-セマフォの所有者 (ユーザ ID)、グループ所有権 (グループ ID) には、
-それぞれ呼び出し元プロセスの実効 UID、実効 GID が設定される。
-.\" 実際は、Linux ではファイルシステム ID が使用される。
-.\"O If both
-.\"O .B O_CREAT
-.\"O and
-.\"O .B O_EXCL
-.\"O are specified in
-.\"O .IR oflag ,
-.\"O then an error is returned if a semaphore with the given
-.\"O .I name
-.\"O already exists.
-.I oflag
-に
-.B O_CREAT
-と
-.B O_EXCL
-の両方が指定された場合、指定された名前
-.I name
-のセマフォがすでに存在するとエラーが返される。
+.\" In reality the file system IDs are used on Linux.
+\fIoflag\fP 引き数には、 \fBsem_open\fP()  の動作を制御するフラグを指定する (oflag の値の定義は
+\fI<fcntl.h>\fP のインクルードにより得られる)。 \fIoflag\fP に \fBO_CREAT\fP
+が指定されると、まだ存在しない場合にはそのセマフォが作成される。 セマフォの所有者 (ユーザ ID)、グループ所有権 (グループ ID) には、
+それぞれ呼び出し元プロセスの実効 UID、実効 GID が設定される。 \fIoflag\fP に \fBO_CREAT\fP と \fBO_EXCL\fP
+の両方が指定された場合、指定された名前 \fIname\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 semaphore,
-.\"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.
-.\"O Both read and write permission should be granted to each class of
-.\"O user that will access the semaphore.
-.I mode
-引き数は、
-.BR open (2)
-と同じように、新しいセマフォに設定されるアクセス許可 (permission) を
-指定する。許可設定はプロセスの umask でマスクされる
-(許可ビットのシンボル定義は
-.I <sys/stat.h>
-のインクルードにより得られる)。
-セマフォにアクセスしようとするユーザは、読み出し許可と書き込み許可の
-両方を得る必要がある。
-.\"O The
-.\"O .I value
-.\"O argument specifies the initial value for the new semaphore.
-.\"O If
-.\"O .B O_CREAT
-.\"O is specified, and a semaphore with the given
-.\"O .I name
-.\"O already exists, then
-.\"O .I mode
-.\"O and
-.\"O .I value
-.\"O are ignored.
-.I value
-引き数は新しいセマフォの初期値を指定する。
-.B O_CREAT
-が指定され、指定した名前
-.I name
-のセマフォがすでに存在する場合、
-.I mode
-と
-.I value
-は無視される。
-.\"O .SH RETURN VALUE
+\fIoflag\fP に \fBO_CREAT\fP を指定する場合、さらに引き数が 2 つ必要である。 \fImode\fP 引き数は、 \fBopen\fP(2)
+と同じように、新しいセマフォに設定されるアクセス許可 (permission) を 指定する。許可設定はプロセスの umask でマスクされる
+(許可ビットのシンボル定義は \fI<sys/stat.h>\fP のインクルードにより得られる)。
+セマフォにアクセスしようとするユーザは、読み出し許可と書き込み許可の 両方を得る必要がある。 \fIvalue\fP
+引き数は新しいセマフォの初期値を指定する。 \fBO_CREAT\fP が指定され、指定した名前 \fIname\fP のセマフォがすでに存在する場合、
+\fImode\fP と \fIvalue\fP は無視される。
 .SH 返り値
-.\"O On success,
-.\"O .BR sem_open ()
-.\"O returns the address of the new semaphore;
-.\"O this address is used when calling other semaphore-related functions.
-.\"O On error,
-.\"O .BR sem_open ()
-.\"O returns
-.\"O .BR SEM_FAILED ,
-.\"O with
-.\"O .I errno
-.\"O set to indicate the error.
-成功すると、
-.BR sem_open ()
-は新しいセマフォのアドレスを返す。
-このアドレスは他のセマフォ関連の関数を呼び出す際に使用される。
-エラーの場合、
-.BR sem_open ()
-は
-.B SEM_FAILED
-を返し、
-.I errno
-にエラーを示す値をセットする。
-.\"O .SH ERRORS
+成功すると、 \fBsem_open\fP()  は新しいセマフォのアドレスを返す。 このアドレスは他のセマフォ関連の関数を呼び出す際に使用される。
+エラーの場合、 \fBsem_open\fP()  は \fBSEM_FAILED\fP を返し、 \fIerrno\fP にエラーを示す値をセットする。
 .SH エラー
-.TP
-.B EACCES
-.\"O The semaphore exists, but the caller does not have permission to
-.\"O open it.
-そのセマフォが存在するが、呼び出し元にはそのセマフォをオープンする
-許可がない。
-.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 semaphore with this
-.\"O .I name
-.\"O already exists.
-.I oflag
-に
-.B O_CREAT
-と
-.B O_EXCL
-の両方が指定されたが、
-.I name
-という名前のセマフォはすでに存在する。
-.TP
-.B EINVAL
-.\"O .I value
-.\"O was greater than
-.\"O .BR SEM_VALUE_MAX .
-.I value
-が
-.B SEM_VALUE_MAX
-よりも大きい。
-.TP
-.B EINVAL
-.\"O .I name
-.\"O consists of just "/", followed by no other characters.
-.I name
-が "/" だけで構成され、その後ろに他の文字が続いていなかった。
-.TP
-.B EMFILE
-.\"O The process already has the maximum number of files and open.
+.TP 
+\fBEACCES\fP
+そのセマフォが存在するが、呼び出し元にはそのセマフォをオープンする 許可がない。
+.TP 
+\fBEEXIST\fP
+\fIoflag\fP に \fBO_CREAT\fP と \fBO_EXCL\fP の両方が指定されたが、 \fIname\fP という名前のセマフォはすでに存在する。
+.TP 
+\fBEINVAL\fP
+\fIvalue\fP が \fBSEM_VALUE_MAX\fP よりも大きい。
+.TP 
+\fBEINVAL\fP
+\fIname\fP が "/" だけで構成され、その後ろに他の文字が続いていなかった。
+.TP 
+\fBEMFILE\fP
 オープンされたファイル数がすでにそのプロセスにおける上限に達している。
-.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 has been reached.
+.TP 
+\fBENAMETOOLONG\fP
+\fIname\fP が長すぎる。
+.TP 
+\fBENFILE\fP
 オープンされたファイル総数がシステム全体での上限に達している。
-.TP
-.B ENOENT
-.\"O The
-.\"O .B O_CREAT
-.\"O flag was not specified in
-.\"O .IR oflag
-.\"O and no semaphore with this
-.\"O .I name
-.\"O exists;
-.I oflag
-に
-.B O_CREAT
-フラグが指定されておらず、
-.I name
-という名前のセマフォも存在しない。
-.\"O or,
-または、
+.TP 
+\fBENOENT\fP
 .\" this error can occur if we have a name of the (nonportable) form
 .\" /dir/name, and the directory /dev/shm/dir does not exist.
-.\"O .B O_CREAT
-.\"O was specified, but
-.\"O .I name
-.\"O wasn't well formed.
-.B O_CREAT
-が指定されたが、
-.I name
-が適切な形式ではなかった。
-.TP
-.B ENOMEM
-.\"O Insufficient memory.
+\fIoflag\fP に \fBO_CREAT\fP フラグが指定されておらず、 \fIname\fP という名前のセマフォも存在しない。 または、
+\fBO_CREAT\fP が指定されたが、 \fIname\fP が適切な形式ではなかった。
+.TP 
+\fBENOMEM\fP
 十分なメモリがない。
-.\"O .SH CONFORMING TO
 .SH 準拠
-POSIX.1-2001.
-.\"O .SH "SEE ALSO"
+POSIX.1\-2001.
 .SH 関連項目
-.BR sem_close (3),
-.BR sem_getvalue (3),
-.BR sem_post (3),
-.BR sem_unlink (3),
-.BR sem_wait (3),
-.BR sem_overview (7)
+\fBsem_close\fP(3), \fBsem_getvalue\fP(3), \fBsem_post\fP(3), \fBsem_unlink\fP(3),
+\fBsem_wait\fP(3), \fBsem_overview\fP(7)