[ 本帖最后由 MMMIX 于 2007-3-9 00:28 编辑 ]作者: semomo 时间: 2007-03-10 00:44
谢谢
昨天找了半天ourhdr.h,竟然没看见那一行。。。作者: lcl-cgy 时间: 2007-03-10 10:19
应该是程序定义的宏,creat函数原型是这样的:
int fd=creat(char *filename, mode_t mode)
其中mode是4、2、1的组合,如:0755,0644等,其中4、2、1分别对应r、w、x。作者: lcl-cgy 时间: 2007-03-10 10:20
另外,fd在程序退出是需要close作者: langue 时间: 2007-03-10 10:47
It stand for the mode in which the file will be created. Refer to creat(2) for more info.
Note: creat(2) is obsolete, and please use open(2) with O_CREAT instead.作者: feasword 时间: 2007-03-10 13:21
是在apue.h中定义的
#define FILE_MODE (S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH)作者: hiwoody 时间: 2007-03-10 20:49
提示: 作者被禁止或删除 内容自动屏蔽