进程管道的通信

三 管道 管道分为:有名管道,无名管道 无名管道的创建使用pipe(2):  #include <unistd.h>  int pipe(int pipefd[2]); 功能:创建管道 参数: pipefd[2]:管道的两个文件描述符。 pipefd[0]:读端 pipefd[1]:写端 返回值: 0 成功 -1  错误  errno被设置 举例验证代码使用pipe.c 1.父进程创建管道 2.
相关文章
相关标签/搜索