On Sat, Jan 15, 2005 at 02:36:56AM +0000, H. Peter Anvin wrote:
> Followup to:  <[EMAIL PROTECTED]>
> By author:    "Theodore Ts'o" <[EMAIL PROTECTED]>
> In newsgroup: linux.dev.kernel
> > 
> > Good point.  The fact that there are other implementations out there
> > which are doing this is a convincing argument.  
> > 
> > I am still a bit concerned still that a stupidly written program that
> > opens /dev/urandom (perhaps unwittingly) and tries to read a few
> > hundred megabytes will become uninterruptible until the read
> > completes, but I'm not sure it's worth it to but in some kludge that
> > says "break if there's a signal and count > 1 megabyte --- otherwise
> > we'll return soon enough".
> > 
> 
> I'm very concerned about this; this is fundamentally a change to
> signal delivery semantics.
> 
> What we might want to go along with is a read smaller than PIPE_BUF
> (the largest size guaranteed to be atomic when writing to a pipe,
> which is another special case) should not return fractional.

What about signals to a process blocked on /dev/random (which also has no
documented mention of being interruptible by signals)?

Not handling short reads is always a bug.

-- 
Mathematics is the supreme nostalgia of our time.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to