- 论坛徽章:
- 1
|
原帖由 flw 于 2007-4-7 17:23 发表 ![]()
你看的是哪一版?
我这里有一份电子的,我看了一下,第 4.2 节讲的是 stat fstat 和 lstat 啊。没有说 read。
考虑到你有可能是 4.20 节的手误,我还特意看了一下,讲的是 mkdir。
《unix 高级环境编程2》14.8
14.8. readn and writen Functions
Pipes, FIFOs, and some devices, notably terminals, networks, and STREAMS devices, have the following two properties.
A read operation may return less than asked for, even though we have not encountered the end of file. This is not an error, and we should simply continue reading from the device.
A write operation can also return less than we specified. This may be caused by flow control constraints by downstream modules, for example. Again, it's not an error, and we should continue writing the remainder of the data. (Normally, this short return from a write occurs only with a nonblocking descriptor or if a signal is caught.)
We'll never see this happen when reading or writing a disk file, except when the file system runs out of space or we hit our quota limit and we can't write all that we requested. |
|