redflowflag 发表于 2005-3-1 16:10:21

关于命名管道的问题

命名管道是把一个命令的输出定向到另一个命令的输入.

如果我用
mkfifo mypipe
生成了一个mypipe的命名管道.请问我该如何使用这个pipe文件呢.

wanggang 发表于 2005-3-1 18:41:04

请问:MKFIFO生成的是FIFO文件,你的命令好象是生成文件的呀

redflowflag 发表于 2005-3-2 07:51:04

命名管理好像就是一个特殊的文件啊。块设备文件,字符设备文件不也是文件吗?

redflowflag 发表于 2005-3-2 07:53:36

至少也是以文件的形式存在于磁盘空间上的吧

BOoRFGOnZ 发表于 2005-3-2 12:05:10

8)mkfifo

create FIFO special files
       
Command
SYNOPSIS

mkfifo fifo_name ...
DESCRIPTION

The mkfifo utility creates the FIFOs requested, in the order specified, using mode 0777. mkfifo requires write permission in the parent directory.

FIFOs must be created under the ROOTDIR/fifos directory.

FIFOs created by this command are for use only by NuTCRACKER Platform applications. These FIFOs appear as regular files to non-NuTCRACKER Platform applications. If a non-NuTCRACKER Platform application writes to a FIFO, the FIFO is corrupted such that it no longer appears as a FIFO to NuTCRACKER Platform applications.
DIAGNOSTICS

Possible exit status values are:

0

    Successful completion.
>0

    An error occurred.

AVAILABILITY

MKS Toolkit for Power Users
MKS Toolkit for System Administrators
MKS Toolkit for Developers
MKS Toolkit for Interoperability
MKS Toolkit for Professional Developers
MKS Toolkit for Enterprise Developers
MKS Toolkit for Enterprise Developers 64-Bit Edition
MKS AlertCentre
SEE ALSO

Functions:
    mkfifo()
页: [1]
查看完整版本: 关于命名管道的问题