2011年7月20日
摘要: 打开两个终端,在第一个终端先执行fifo_read,创建有名管道,并且等待输入端输入之后,再在第二个终端执行fifo_write,之后,fifo_write将向管道写入数据,此时,输出管道将有数据可读,因此被唤醒,从管道中读出数据,并显示出来。/*fifo_read.c*/#include <stdio.h>#include <sys/types.h>#include <sys/stat.h>#include <string.h>#include <fcntl.h>#include <errno.h>#include &l 阅读全文
posted @ 2011-07-20 23:44 image eye 阅读(2188) 评论(0) 推荐(0) 编辑