- 5
- 0
- 约4.95万字
- 约 9页
- 2017-06-03 发布于河南
- 举报
管道通信
管道通信
/*******************************************************************************************/
//pipe.c
//frome the example, we can see:
//用pipe创建的无名管道,父子进程,子子进程之间都可以通信,由于read
//或write默认为阻塞,而进程与进程之间又有某种意义上的同步方法;
//故而可以从下面的程序中得到一些启示。
/*****************************************************************************************/
#include stdio.h
#include stdlib.h
#include unistd.h
#include errno.h
int main()
{
int pipe_fd[2];
char buf_r[100];
char buf_rr[100];
if(pipe(pipe_fd)0)
{
printf(pi
原创力文档

文档评论(0)