1
int ret, myPipe[2]; char buffer[MAX_LINE+1]; /**//* 建立管道 */ ret = pipe( myPipe );
/**//* 将消息写入管道 */ write( myPipe[1], string, strlen(string) );
/**//* 从管道读取消息 */ ret = read( myPipe[0], buffer, MAX_LINE );
posted on 2010-11-12 14:12 maximusfz 阅读(150) 评论(0) 收藏 举报
博客园 © 2004-2026 浙公网安备 33010602011771号 浙ICP备2021040463号-3