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

Posted by Vi on Stack Overflow See other posts from Stack Overflow or by Vi
Published on 2010-05-30T11:39:45Z Indexed on 2010/05/30 11:42 UTC
Read the original article Hit count: 157

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.

I expect any good program should do all their reads and writes in a loop until without relying that write will write everything. Am I right?

/* Implemented simple FUSE filesystem which only allows reading and writing with small buffers, very often returning that it is written less bytes that in a buffer. Some programs work, some not. Are them buggy? */

© Stack Overflow or respective owner

Related posts about language-agnostic

Related posts about terminology