why open returns zero?
2015-12-27 17:56
274 查看
在试验open代码的时候,也犯了和这个哥们一样的错误。
如此低级的错误一定不要再犯了。
点击打开链接
Your conditional is off. Mind the parentheses. It should be:
Sometimes it might be best not to outsmart yourself:
如此低级的错误一定不要再犯了。
点击打开链接
Your conditional is off. Mind the parentheses. It should be:
if ((fd2 = open(logFile, O_RDWR |O_APPEND | O_CREAT , 0666)) == -1) // ^^^ ^^^
Sometimes it might be best not to outsmart yourself:
int fd = open(...); if (fd == -1) { DieWithError(); }
相关文章推荐
- Hadoop常用命令
- linux(CentOS6.5)之postfix服务器编译安装
- Hadoop2.6.0完全集群安装配置
- chapter9:文件与文件系统的压缩与打包之(1)Linux常见的压缩命令
- Mac上配置Apache、php、MySQL
- Kali Linux下安装配置ProFTPD实例
- centos安装mysql5.7.10
- Linux 网卡设备驱动程序设计(3)
- CentOS程序包管理工具浅析
- 深度学习(二十二)Dropout浅层理解与实现
- Linux学习之:yum程序包管理命令
- Hadoop 生态系统
- linux 字符界面浏览器 w3m(转)
- linux运维实战练习案例-2015年12月20日-12月31日 (第一次)
- Linux Crontab 安装使用详细说明
- makefile中的wildcard用法
- Openwrt编译问题:Libnettle 3.1 was not found.
- Objc 精选 - 3D Touch 之 Peek & Pop 操作
- CentOS7 引导win7
- Linux常用命令 - ifconfig