-- 无名管道
#include <unistd.h>
int pipe(int fd[2])
#无名管道通常不用在进程间通信。
-- 命名管道
#include <sys/types.h>
#include <sys/stat.h>
int mkfifo(const char * pathname, mode_t mode)
本文介绍了两种管道通信方式:无名管道和命名管道的基本使用方法。无名管道通过pipe函数创建,主要用于父子进程间的通信;命名管道则通过mkfifo函数创建,支持不同进程间的通信。
-- 无名管道
#include <unistd.h>
int pipe(int fd[2])
#无名管道通常不用在进程间通信。
-- 命名管道
#include <sys/types.h>
#include <sys/stat.h>
int mkfifo(const char * pathname, mode_t mode)
1万+

被折叠的 条评论
为什么被折叠?