摘要: #include int creat(const char *pathname, mode_t mode); 若成功则返回为只写打开的文件描述符,若出错则返回-1; 有时候我们使用creat函数的时候可能会得不到我们想要的结果。例如:creat("foo",0666) 当我们使用次函数的目的创建一个文件——foo,foo的属性为 -rw-rw-rw-; 但是我们执行完creat函数之后可能会发生其他的结果,笔者的系统是REHL5.1,当我执行完creat函数之后foo的属性为:-rw-r--r--; 这是为什么呢? 如果你想知道为什么,就在命令行里执行umask看一下吧; 阅读全文
posted @ 2013-09-13 18:32 net小伙 阅读(4982) 评论(0) 推荐(0) 编辑
摘要: Cocktail 鸡尾酒 It is quite usual to drink cocktails before lunch and dinner in America and somewhat less usual, except in California, to drink wine with a meal. You can either have a cocktail in the bar, if there is one, while you wait for a table or for friends, or you can have one served before y... 阅读全文
posted @ 2013-09-13 11:00 net小伙 阅读(548) 评论(0) 推荐(0) 编辑