![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
APUE读书笔记
文章平均质量分 70
hitkid
这个作者很懒,什么都没留下…
展开
-
习题3.2:不调用fcntl函数来实现dup2的功能
思路:用dup来实现dup2程序:#include #include #include int mydup2(int oldfd, int newfd){ int *p; int i = 0; if (oldfd == newfd) return newfd; close(newfd); p = (int原创 2009-11-27 20:10:00 · 781 阅读 · 0 评论 -
习题4.6:复制空洞文件但不写入0
本文转自:http://blog.csdn.net/happyangel_xl/archive/2009/07/26/4382218.aspx程序:/* copy hole files without filling the hole with char 0*/#include "apue.h"#include #define BUFFSIZE 4096转载 2009-11-28 10:25:00 · 621 阅读 · 0 评论