write真能返回一个非负的却小于写入长度值的整数吗?
MSDN对_write返回值的解释If successful, _write returns the number of bytes actually written. If the actual space remaining on the disk is less than the size of the buffer the function is trying to write to the disk, _write fails and does not flush any of the buffer’s contents to the disk. A return value of –1 indicates an error. In this case, errno is set to one of two values: EBADF, which means the file handle is invalid or the file is not opened for writing, or ENOSPC, which means there is not enough space left on the device for the operation.
在我的理解:返回值分三类
1: -1 写入错误
len: 正确的完整写入文件
(0,len) 但是在0到len之间的数值代表什么意思呢?我一直没有像明白,或者是我英语不好,对这个理解错误了?