Re: manipulating sigmask from filesystems and drivers

Roman Zippel
2002-08-01T22:32:21Z

Hi

On Thu, 1 Aug 2002, Linus Torvalds wrote:

> This is not "sloppy programming". See the read() system call manual, which
> says
>
> Upon successful completion, read(), readv(), and pread() return the num-
> ber of bytes actually read and placed in the buffer. The system guaran-
> tees to read the number of bytes requested if the descriptor references a
> normal file that has that many bytes left before the end-of-file, but in
> no other case.
>
> Note the "The system guarantees to read the number of bytes requested .."
> part.

Relying on that the fd will always point to a normal file is only asking
for trouble.

> Stop arguing about this. It's a FACT.

Linus, it's not that I don't want to believe you, but e.g. the SUS doesn't
make that special exception.
Installing signal handlers and not expecting EINTR _is_ sloppy
programming.

bye, Roman