From: Adam Kropelin <akropel1@rochester.rr.com>
To: Clayton Weaver <cgweav@email.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [2.4.19] read(2) and page aligned buffers
Date: Thu, 7 Nov 2002 08:43:46 -0500 [thread overview]
Message-ID: <20021107134346.GA25833@www.kroptech.com> (raw)
In-Reply-To: <20021107065421.20283.qmail@email.com>
On Thu, Nov 07, 2002 at 01:54:21AM -0500, Clayton Weaver wrote:
> Here is wrap_read() (assume that the appropriate #includes are there):
Your code is broken, and for exactly the same reason I told you
yesterday.
> default: /* partial read */
> switch(errno) {
> case EINTR: /* interrupted by signal */
> case EAGAIN: /* O_NONBLOCK ? */
> retval += tmpret;
> break;
I repeat: Checking errno when read() has returned something other than
-1 is ILLEGAL. Period. This check is triggering early, thus giving your
supposed early EOF.
This is not even remotely a kernel issue.
--Adam
next prev parent reply other threads:[~2002-11-07 13:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-11-07 6:54 [2.4.19] read(2) and page aligned buffers Clayton Weaver
2002-11-07 13:43 ` Adam Kropelin [this message]
-- strict thread matches above, loose matches on Subject: below --
2002-11-06 18:13 Clayton Weaver
2002-11-06 19:38 ` Adam Kropelin
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=20021107134346.GA25833@www.kroptech.com \
--to=akropel1@rochester.rr.com \
--cc=cgweav@email.com \
--cc=linux-kernel@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.