开发者

How it is called when write or read return less that requested?

开发者 https://www.devze.com 2023-01-01 19:31 出处:网络
What term should I use to describe situations (or bugs in software) caused by read, write, send, recv doing less work than expected?

What term should I use to describe situations (or bugs in software) caused by read, write, send, recv doing less work than expected?

For example, write(fd, "123456", 6); may return 3 and we need to write "456" to finish our work.

/* Still in doubt between "short write开发者_运维知识库/read" and "data truncation" after reading answers. */


It is called truncation:

http://en.wikipedia.org/wiki/Data_truncation


short write ....


I'm not sure it has a specific name. It has to do with buffering and channel availability. For example, when you send over a network there is some sort of a window which you can fill up completely, but if the previous data hasn't been completely sent yet, then right now you can only stream in enough to fill up this window.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号