#include<unistd.h>
1.创建无名管道 int pipe(int fd[2]);
成功返回0;失败返回EOF
读写管道用write、read
#include<unistd.h>
#include<fcntl.h>
2.创建有名管道 int mkfifo(const char *path,mode_t mode);
成功返回0,失败EOF
用open函数打开管道文件
#include<unistd.h>
1.创建无名管道 int pipe(int fd[2]);
成功返回0;失败返回EOF
读写管道用write、read
#include<unistd.h>
#include<fcntl.h>
2.创建有名管道 int mkfifo(const char *path,mode_t mode);
成功返回0,失败EOF
用open函数打开管道文件