Re: read() details

From: Alan Cox (
Date: Thu Jul 26 2001 - 17:24:28 EST

> Is it safe to assume that when a single read() call of x bytes a file
> (the file being locked against other processes appending to it) returns
> less than x bytes, the next read() will always return 0? If so, is it

No. Posix allows any read to be interrupted. Unix doesn't do this. Even so
another writer in parallel on the same file will cause what you describe
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

This archive was generated by hypermail 2b29 : Tue Jul 31 2001 - 21:00:29 EST