Re: manipulating sigmask from filesystems and drivers

From: Linus Torvalds (
Date: Thu Aug 01 2002 - 16:42:17 EST

On Thu, 1 Aug 2002, Roman Zippel wrote:

> > Go read the standards. Some IO is not interruptible.
> Which standard? Which "some IO"?

Any regular file IO is supposed to give you the full result.

If you write() to a file, and get a partial return value back due to a
signal, there are programs that will assume that the disk is full (there
are also programs that will just lose your data).

This is not "sloppy programming". See the read() system call manual, which

     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 .."

Stop arguing about this. It's a FACT.


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

This archive was generated by hypermail 2b29 : Wed Aug 07 2002 - 22:00:17 EST