public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: yodaiken@fsmlabs.com
To: Linus Torvalds <torvalds@transmeta.com>
Cc: David Woodhouse <dwmw2@infradead.org>,
	Roman Zippel <zippel@linux-m68k.org>,
	David Howells <dhowells@redhat.com>,
	alan@redhat.com, linux-kernel@vger.kernel.org
Subject: Re: manipulating sigmask from filesystems and drivers
Date: Fri, 2 Aug 2002 09:59:37 -0600	[thread overview]
Message-ID: <20020802095937.B2300@hq.fsmlabs.com> (raw)
In-Reply-To: <Pine.LNX.4.33.0208011538220.1277-100000@penguin.transmeta.com>; from torvalds@transmeta.com on Thu, Aug 01, 2002 at 03:40:56PM -0700

On Thu, Aug 01, 2002 at 03:40:56PM -0700, Linus Torvalds wrote:
> 
> 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.
> 

SusV2 and POSIX seem to have changed the prior standard

     The value  returned  may be less than nbyte if the number of bytes
     left  in  the  file  is  less than nbyte, if the read() request was
     interrupted  by  a  signal,  or  if  the  file is a pipe or FIFO or
     special  file  and has fewer than nbyte bytes immediately available
     for  reading.


The rationale mentions that
	while( read(...) > 0) 
must work
but, I think Linus is correct that many programs rely on
	while( read(fd,&b,n) == n)

------------------susv2

     If a read() is interrupted by a signal before it reads any data, it
     will return -1 with errno set to [EINTR].

     If  a  read()  is interrupted by a signal after it has successfully
     read some data, it will return the number of bytes read.
----------------------



The grim effects of "cancel" spread through the system.


-------------------------------------
The transitive closure of a design error is limited only by the size of
the program.


  parent reply	other threads:[~2002-08-02 15:59 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-31 11:52 manipulating sigmask from filesystems and drivers David Howells
2002-07-31 11:58 ` Alan Cox
2002-08-01 19:09 ` Linus Torvalds
2002-08-01 20:10   ` David Woodhouse
2002-08-01 20:21     ` Linus Torvalds
2002-08-01 20:47       ` Roman Zippel
2002-08-01 20:51         ` Linus Torvalds
2002-08-01 21:15           ` Roman Zippel
2002-08-01 21:42             ` Linus Torvalds
2002-08-01 22:29               ` David Woodhouse
2002-08-01 22:40                 ` Linus Torvalds
2002-08-01 22:50                   ` David Woodhouse
2002-08-02 15:59                   ` yodaiken [this message]
2002-08-01 22:35               ` Roman Zippel
2002-08-01 23:30                 ` Linus Torvalds
2002-08-02  0:31                   ` Olivier Galibert
2002-08-02  8:00                     ` Kai Henningsen
2002-08-02 10:02                   ` Roman Zippel
2002-08-02 12:38                     ` Ryan Anderson
2002-08-02 15:39                     ` Linus Torvalds
2002-08-02 16:00                       ` Benjamin LaHaise
2002-08-02 16:27                         ` Linus Torvalds
2002-08-02 17:13                           ` Jamie Lokier
2002-08-02 17:29                             ` Linus Torvalds
2002-08-02 17:57                               ` Trond Myklebust
2002-08-02 18:10                                 ` Linus Torvalds
2002-08-02 17:33                           ` Oliver Neukum
2002-08-03 18:27                             ` David Woodhouse
2002-10-17  8:32                           ` David Woodhouse
2002-08-02 19:27                       ` Roman Zippel
2002-08-02  7:31                 ` Giuliano Pochini
     [not found]   ` <mailman.1028232841.11555.linux-kernel2news@redhat.com>
2002-08-01 23:37     ` Pete Zaitcev
2002-08-01 23:46       ` David Woodhouse
     [not found] <0C01A29FBAE24448A792F5C68F5EA47D2D3E2B@nasdaq.ms.ensim.com>
2002-08-02 17:57 ` Paul Menage
2002-08-02 23:25   ` Ryan Anderson
2002-08-02 23:30     ` Paul Menage
  -- strict thread matches above, loose matches on Subject: below --
2002-08-02 18:24 Jesse Pollard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020802095937.B2300@hq.fsmlabs.com \
    --to=yodaiken@fsmlabs.com \
    --cc=alan@redhat.com \
    --cc=dhowells@redhat.com \
    --cc=dwmw2@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@transmeta.com \
    --cc=zippel@linux-m68k.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox