On Mon, Jun 04, 2007 at 11:02:23AM -0600, Matthew Wilcox wrote:
> On Mon, Jun 04, 2007 at 09:56:07AM -0700, Bryan Henderson wrote:
> > Programs that assume a full transfer are fairly common, but are
> > universally regarded as either broken or just lazy, and when it does cause
> > a problem, it is far more common to fix the application than the kernel.
>
> Linus has explicitly forbidden short reads from being returned. The
> original poster may get away with it for a specialised case, but for
> example, signals may not cause a return to userspace with a short read
> for exactly this reason.
Hmm, I'm not sure I would go that far. Per the POSIX specification,
we support the optional BSD-style restartable system calls for signals
which will avoid short reads; but this is only true if SA_RESTART is
passed to sigaction(). Without SA_RESTART, we will indeed return
short reads, as required by POSIX.
I don't think Linus has said that short reads are always evil; I
certainly can't remember him ever making that statement. Do you have
a pointer to a LKML message where he's said that?
- Ted
-
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html