Re: read() details

Alan Cox (alan@lxorguk.ukuu.org.uk)
Thu, 26 Jul 2001 23:24:28 +0100 (BST)


> 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 majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/