Re: manipulating sigmask from filesystems and drivers

Linus Torvalds (torvalds@transmeta.com)
Thu, 1 Aug 2002 15:40:56 -0700 (PDT)


On Thu, 1 Aug 2002, David Woodhouse wrote:
>
> torvalds@transmeta.com said:
> > Any regular file IO is supposed to give you the full result.
>
> read(2) is permitted to return -EINTR.

It is _not_ allowed to do that for regular UNIX filesystems.

It is allowed to return it for things like pipes, sockets, etc, and for
filesystems that do not have UNIX behaviour.

> Regular file I/O through the page cache is inherently restartable, anyway,
> as long as you're careful about fpos.

It's not the kernel side that is not restartable. It's the _user_ side.
There is 30 _years_ of history on this, and there are programs that have
been programmed to follow the existing documentation.

And the existing documentation says that if you return a partial read from
a normal file, that means EOF for that file.

You may not like it, but that doesn't make it less so. Linux has UNIX
semantics for read(). Linux is not a research project where we change
fundamental semantics just because we don't like it. That's final.

Linus

-
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/