public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andries.Brouwer@cwi.nl
To: balbir_soni@yahoo.com, jholly@cup.hp.com, plars@austin.ibm.com
Cc: linux-kernel@vger.kernel.org, marcelo@conectiva.com.br
Subject: Re: readv() return and errno
Date: Tue, 26 Mar 2002 16:19:39 GMT	[thread overview]
Message-ID: <UTC200203261619.QAA368367.aeb@cwi.nl> (raw)

Jim Hollenback wrote:

> According to readv(2) EINVAL is returned for an invalid
> argument.

Right.

> The examples given were count might be greater than
> MAX_IOVEC or zero.

Wrong, or at least confusingly phrased.


In the good old days, a man page described what the system did,
and the ERRORS section gave the reasons for the possible error
returns.
These days a man page describes a function present on many
Unix-like systems, and not all systems have precisely the
same behaviour. POSIX man pages therefore distinguish under
ERRORS the two possibilities "if foo then this error must be
returned", and "if foo then this error may be returned".

Linux man pages do not (yet) make this distinction -
adding this is a lot of careful work, and so far
nobody is doing this [hint..].
In other words, the ERRORS section in Linux man pages is
to be interpreted as "if foo then this error may be returned".

Note that it may not be desirable at all to do things that way,
there is no need for kernel patches, it just means that systems
exist with this behaviour, so that authors of portable programs
must take this into account.

Balbir Singh wrote:

> Apply this trivial patch, if you want the required behaviour

But the behaviour is not required.
Paul Larson makes the same mistake.

Andries

             reply	other threads:[~2002-03-26 16:20 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-03-26 16:19 Andries.Brouwer [this message]
2002-03-26 17:01 ` readv() return and errno Balbir Singh
  -- strict thread matches above, loose matches on Subject: below --
2002-03-26 21:37 Andries.Brouwer
2002-03-26 23:38 ` Alan Cox
2002-03-26 21:15 Andries.Brouwer
2002-03-26 23:40 ` Alan Cox
2002-03-26 17:13 Jim Hollenback
2002-03-26 18:06 ` Alan Cox
2002-03-15 23:15 Balbir Singh
2002-03-15 21:54 Jim Hollenback
2002-03-19 13:27 ` Alex Riesen

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=UTC200203261619.QAA368367.aeb@cwi.nl \
    --to=andries.brouwer@cwi.nl \
    --cc=balbir_soni@yahoo.com \
    --cc=jholly@cup.hp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcelo@conectiva.com.br \
    --cc=plars@austin.ibm.com \
    /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