.\" 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 .\" .\" Japanese Version Copyright (c) 1998 George Momma .\" all rights reserved. .\" Translated Mon May 25 23:11:03 JST 1998 .\" by George Momma .\" Updated 1999-12-11 by Kentaro Shirakata .\" Updated 2008-07-30 by Kentaro Shirakata .\" .\"WORD: named pipe 名前付きパイプ .\"WORD: permission 許可モード .\"WORD: filename ファイル名 .\"WORD: filename component ファイル名部分 .\"WORD: directory component ディレクトリ部分 .TH MKFIFO 3 2008-06-12 "GNU" "Linux Programmer's Manual" .\"O .SH NAME .SH 名前 .\"O mkfifo \- make a FIFO special file (a named pipe) mkfifo \- FIFOスペシャルファイル(名前付きパイプ)を作成する .\"O .SH SYNOPSIS .SH 書式 .nf .B #include .B #include .sp .BI "int mkfifo(const char *" pathname ", mode_t " mode ); .fi .\"O .SH DESCRIPTION .SH 説明 .\"O .BR mkfifo () .\"O makes a FIFO special file with name \fIpathname\fP. .\"O \fImode\fP specifies the FIFO's permissions. .\"O It is modified by the .\"O process's \fBumask\fP in the usual way: the permissions of the created .\"O file are \fB(\fP\fImode\fP\fB & ~umask)\fP. .BR mkfifo () は名前 \fIpathname\fP を持つFIFOスペシャルファイルを作成 する。FIFOの許可モードは \fImode\fP で指定され、プロセスの \fBumask\fP によって通常の方式で変更を受ける: 作成されたファイルの許可 モードは \fB(\fP\fImode\fP\fB & ~umask)\fP となる。 .PP .\"O A FIFO special file is similar to a pipe, except that it is created .\"O in a different way. .\"O Instead of being an anonymous communications .\"O channel, a FIFO special file is entered into the file system by .\"O calling .\"O .BR mkfifo (). FIFOスペシャルファイルはパイプに似ているが、作成のされ方のみが異なって いる。FIFOスペシャルファイルは名前のない通信路ではなく、 .BR mkfifo () の呼び出しによりファイルシステムの中に加えられる。 .PP .\"O Once you have created a FIFO special file in this way, any process can .\"O open it for reading or writing, in the same way as an ordinary file. .\"O However, it has to be open at both ends simultaneously before you can .\"O proceed to do any input or output operations on it. .\"O Opening a FIFO for reading normally blocks until some .\"O other process opens the same FIFO for writing, and vice versa. .\"O See .\"O .BR fifo (7) .\"O for nonblocking handling of FIFO special files. ひとたびこのようにしてFIFOスペシャルファイルが作成されると、通常のファ イルと同じように、どのプロセスからでも読み出し、書き込み用にこれをオー プンすることができる。ただし、これに対する全ての入出力操作に先立って その両端がオープンされている必要がある。FIFOを読み出し用にオープンする と、通常他のプロセスによって同じFIFOが書き込み用にオープンされるまでブ ロックされ、逆の場合も同様である。 FIFOスペシャルファイルをブロックせずに扱う方法については .BR fifo (7) を参照のこと。 .\"O .SH "RETURN VALUE" .SH 返り値 .\"O On success .\"O .BR mkfifo () .\"O returns 0. .\"O In the case of an error, \-1 is returned (in which case, \fIerrno\fP .\"O is set appropriately). 成功した場合 .BR mkfifo () は 0 を返す。 エラーの場合 \-1 を返す (また \fIerrno\fP が適切に設定される)。 .\"O .SH ERRORS .SH エラー .TP .B EACCES .\"O One of the directories in \fIpathname\fP did not allow search .\"O (execute) permission. \fIpathname\fP の中のディレクトリの一つに対し検索(実行)許可がない。 .TP .B EEXIST .\"O \fIpathname\fP already exists. .\"O This includes the case where .\"O .I pathname .\"O is a symbolic link, dangling or not. \fIpathname\fP がすでに存在する。 これには、 .I pathname が(リンク切れかどうかに関わらず)シンボリックリンクである場合も含む。 .TP .B ENAMETOOLONG .\"O Either the total length of \fIpathname\fP is greater than .\"O \fBPATH_MAX\fP, or an individual filename component has a length .\"O greater than \fBNAME_MAX\fP. .\"O In the GNU system, there is no imposed .\"O limit on overall filename length, but some file systems may place .\"O limits on the length of a component. \fIpathname\fP の長さが \fBPATH_MAX\fP を超えているか、個々のファイル 名部分の長さが \fBNAME_MAX\fP を超えている。GNUシステムにおいては、ファ イル名の全体の長さに対しては制限は課せられていないが、ファイルシステム によっては各部分の長さに制限のある可能性がある。 .TP .B ENOENT .\"O A directory component in \fIpathname\fP does not exist or is a .\"O dangling symbolic link. \fIpathname\fP の中のディレクトリ部分が存在しないか、リンク先のないシ ンボリックリンクである。 .TP .B ENOSPC .\"O The directory or file system has no room for the new file. ディレクトリまたはファイルシステムに新規ファイルを作成する余地がない。 .TP .B ENOTDIR .\"O A component used as a directory in \fIpathname\fP is not, in fact, a .\"O directory. \fIpathname\fP 中でディレクトリとして使用されている部分が実際にはディ レクトリではない。 .TP .B EROFS .\"O \fIpathname\fP refers to a read-only file system. \fIpathname\fP が読み取り専用のファイルシステムを指している。 .\"O .SH "CONFORMING TO" .SH 準拠 POSIX.1-2001. .\"O .SH "SEE ALSO" .SH 関連項目 .BR mkfifo (1), .BR close (2), .BR open (2), .BR read (2), .BR stat (2), .BR umask (2), .BR write (2), .BR mkfifoat (3), .BR fifo (7)