#使用方法
cd pipe/
make
./_main
#描述 管道是linux系统中最常用的进程间通信方式,我们平常在命令行中使用如下命令:
cat /tmp/xxx.txt | grep abc
就是使用了管道在cat进程和grep进程间传递数据
pipe的限制有两个:
- 只能用于父子进程等有关联的进程之间来通信
- pipe是单工的,如果要相互通信,需要开两个管道
| Name | Name | Last commit date | ||
|---|---|---|---|---|
parent directory.. | ||||
#使用方法
cd pipe/
make
./_main
#描述 管道是linux系统中最常用的进程间通信方式,我们平常在命令行中使用如下命令:
cat /tmp/xxx.txt | grep abc
就是使用了管道在cat进程和grep进程间传递数据
pipe的限制有两个: