QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 1443|回复: 4

关于命名管道的问题

[复制链接]
发表于 2005-3-1 16:10:21 | 显示全部楼层 |阅读模式
命名管道是把一个命令的输出定向到另一个命令的输入.

如果我用
mkfifo mypipe
生成了一个mypipe的命名管道.请问我该如何使用这个pipe文件呢.
发表于 2005-3-1 18:41:04 | 显示全部楼层
请问:MKFIFO生成的是FIFO文件,你的命令好象是生成文件的呀
回复

使用道具 举报

 楼主| 发表于 2005-3-2 07:51:04 | 显示全部楼层
命名管理好像就是一个特殊的文件啊。块设备文件,字符设备文件不也是文件吗?
回复

使用道具 举报

 楼主| 发表于 2005-3-2 07:53:36 | 显示全部楼层
至少也是以文件的形式存在于磁盘空间上的吧
回复

使用道具 举报

发表于 2005-3-2 12:05:10 | 显示全部楼层
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()
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2024-10-6 15:24 , Processed in 0.040132 second(s), 16 queries .

© 2021 Powered by Discuz! X3.5.

快速回复 返回顶部 返回列表