摘要: #include #include #include #include #include #include #include #include #include char* buf; struct stat statbuf; void handler(int signo) { printf("permission denied\n"); if (... 阅读全文
posted @ 2017-06-12 14:16 小 楼 一 夜 听 春 雨 阅读(721) 评论(0) 推荐(0) 编辑
摘要: int open(const char *path, int access,int mode) path 要打开的文件路径和名称 access 访问模式,宏定义和含义如下: O_RDONLY 1 只读打开 O_WRONLY 2 只写打开 O_RDWR 4 读写打开 还可选择以下模式与以上3种基本模式 阅读全文
posted @ 2017-06-12 14:09 小 楼 一 夜 听 春 雨 阅读(1998) 评论(0) 推荐(0) 编辑