摘要:
file/hole.c #include "apue.h"#include char buf1[] = "abcdefghij";char buf2[] = "ABCDEFGHIJ";intmain(void){ int fd; if ((fd = creat("file.hole", FILE_MODE)) < 0) err_sys("creat error"); if (write(fd... 阅读全文
摘要:
file/seek.c#include "apue.h"intmain(void){ if (lseek(STDIN_FILENO, 0, SEEK_CUR) == -1) printf("cannot seek\n"); else printf("seek OK\n"); exit(0);} 阅读全文
摘要:
lib/openmax.c#include "apue.h"#include #include #ifdef OPEN_MAXstatic long openmax = OPEN_MAX;#elsestatic long openmax = 0;#endif/* * If OPEN_MAX is i... 阅读全文
摘要:
lib/pathalloc.c#include "apue.h"#include #include #ifdef PATH_MAXstatic int pathmax = PATH_MAX;#elsestatic int pathmax = 0;#endif#define SUSV3 200112L... 阅读全文
摘要:
(1) sysconf() 返回选项 (变量) 的当前值,这个值可配置的但也是受系统限制的。在成功完成的情况下,sysconf() 返回变量的当前值。该值受到的限制将少于编译时 , 或 中可用的对应值。大多数这些变量的值在调用进程的生存时间内不变。如果出错,那么函数返回 -1 ,并适当地设置 e... 阅读全文