Re: read() details

From: Alan Cox (alan@lxorguk.ukuu.org.uk)
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 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/



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