错误的文件打开:文件已存在
问题描述:
开放的()的返回值是-1并试图找到利用误差PERROR()的输出是文件存在。
The return value of an open() was -1 and on trying to find the error using perror() the output was "File exists".
我如何查找错误或文件不开放的原因。
How do I find the error or the reason for the file not opening.
答
看起来
EEXIST结果
路径已经存在,O_CREAT和O_EXCL使用了。
EEXIST
pathname already exists and O_CREAT and O_EXCL were used.