.\" Hey Emacs! This file is -*- nroff -*- source. .\" .\" This manpage is Copyright (C) 1995 James R. Van Zandt .\" .\" 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. .\" .\" Permission is granted to copy and distribute modified versions of this .\" manual under the conditions for verbatim copying, provided that the .\" entire resulting derived work is distributed under the terms of a .\" permission notice identical to this one. .\" .\" Since the Linux kernel and libraries are constantly changing, this .\" manual page may be incorrect or out-of-date. The author(s) assume no .\" responsibility for errors or omissions, or for damages resulting from .\" the use of the information contained herein. The author(s) may not .\" have taken the same level of care in the production of this manual, .\" which is licensed free of charge, as they might when working .\" professionally. .\" .\" Formatted or processed versions of this manual, if unaccompanied by .\" the source, must acknowledge the copyright and authors of this work. .\" .\" changed section from 2 to 3, aeb, 950919 .\" .\"******************************************************************* .\" .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* .TH MKFIFO 3 2008\-06\-12 GNU "Linux Programmer's Manual" .SH 名前 mkfifo \- FIFOスペシャルファイル(名前付きパイプ)を作成する .SH 書式 .nf \fB#include \fP \fB#include \fP .sp \fBint mkfifo(const char *\fP\fIpathname\fP\fB, mode_t \fP\fImode\fP\fB);\fP .fi .SH 説明 \fBmkfifo\fP() は名前 \fIpathname\fP を持つFIFOスペシャルファイルを作成 する。FIFOの許可モードは \fImode\fP で指定され、プロセスの \fBumask\fP によって通常の方式で変更を受ける: 作成されたファイルの許可 モードは \fB(\fP\fImode\fP\fB & ~umask)\fP となる。 .PP FIFOスペシャルファイルはパイプに似ているが、作成のされ方のみが異なって いる。FIFOスペシャルファイルは名前のない通信路ではなく、 \fBmkfifo\fP() の呼び出しによりファイルシステムの中に加えられる。 .PP ひとたびこのようにしてFIFOスペシャルファイルが作成されると、通常のファ イルと同じように、どのプロセスからでも読み出し、書き込み用にこれをオー プンすることができる。ただし、これに対する全ての入出力操作に先立って その両端がオープンされている必要がある。FIFOを読み出し用にオープンする と、通常他のプロセスによって同じFIFOが書き込み用にオープンされるまでブ ロックされ、逆の場合も同様である。 FIFOスペシャルファイルをブロックせずに扱う方法については \fBfifo\fP(7) を参照のこと。 .SH 返り値 成功した場合 \fBmkfifo\fP() は 0 を返す。 エラーの場合 \-1 を返す (また \fIerrno\fP が適切に設定される)。 .SH エラー .TP \fBEACCES\fP \fIpathname\fP の中のディレクトリの一つに対し検索(実行)許可がない。 .TP \fBEEXIST\fP \fIpathname\fP がすでに存在する。 これには \fIpathname\fP がシンボリックリンクである場合も含まれる (シンボリックリンクがリンク切れか (dangling) どうかは関係ない)。 .TP \fBENAMETOOLONG\fP \fIpathname\fP の長さが \fBPATH_MAX\fP を超えているか、個々のファイル 名部分の長さが \fBNAME_MAX\fP を超えている。GNUシステムにおいては、ファ イル名の全体の長さに対しては制限は課せられていないが、ファイルシステム によっては各部分の長さに制限のある可能性がある。 .TP \fBENOENT\fP \fIpathname\fP 中のディレクトリ部分が存在しない、 もしくはリンク先の無いシンボリックリンクである。 .TP \fBENOSPC\fP ディレクトリまたはファイルシステムに新規ファイルを作成する余地がない。 .TP \fBENOTDIR\fP \fIpathname\fP 中のディレクトリ要素が、実際にはディレクトリでない。 .TP \fBEROFS\fP \fIpathname\fP が読み取り専用のファイルシステムを指している。 .SH 準拠 POSIX.1\-2001. .SH 関連項目 \fBmkfifo\fP(1), \fBclose\fP(2), \fBopen\fP(2), \fBread\fP(2), \fBstat\fP(2), \fBumask\fP(2), \fBwrite\fP(2), \fBmkfifoat\fP(3), \fBfifo\fP(7) .SH この文書について この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.41 の一部 である。プロジェクトの説明とバグ報告に関する情報は http://www.kernel.org/doc/man\-pages/ に書かれている。