Linux环境编程
狂神远航
一个没有野心的人,终将一事无成
展开
-
Linux文件I/O---Linux中的文件
内核中进程对应的结构为task_struct(/linux-2.6.30/include/linux/sched.h),进程中文件表保存在files中:struct task_struct { ...... /* open file information */ struct files_struct *files; ....};files_stru...原创 2019-02-16 11:39:03 · 178 阅读 · 0 评论 -
Linux文件I/O---打开/创建文件
打开文件Open介绍文件open在手册中有两个函数原型,如下所示:#include <sys/types.h>#include <sys/stat.h>#include <fcntl.h>int open(const char *pathname, int flags);int open(const char *pathname, int...原创 2019-02-16 19:01:07 · 829 阅读 · 0 评论