mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Michael Kerrisk" <mtk.manpages@googlemail.com>
To: "Linus Torvalds" <torvalds@linux-foundation.org>
Cc: "Roland McGrath" <roland@redhat.com>,
	"Andrew Morton" <akpm@linux-foundation.org>,
	"kernel list" <linux-kernel@vger.kernel.org>,
	"Ulrich Drepper" <drepper@redhat.com>,
	"Vegard Nossum" <vegard.nossum@gmail.com>,
	"linux-man@vger.kernel.org" <linux-man@vger.kernel.org>
Subject: Re: [PATCH] sys_waitid: return -EFAULT for NULL
Date: Wed, 14 Jan 2009 14:39:09 +1300	[thread overview]
Message-ID: <cfd18e0f0901131739v5119271flc28b5531604e682@mail.gmail.com> (raw)
In-Reply-To: <alpine.LFD.2.00.0901131655040.6528@localhost.localdomain>

On Wed, Jan 14, 2009 at 1:57 PM, Linus Torvalds
<torvalds@linux-foundation.org> wrote:
>
>
> On Wed, 14 Jan 2009, Michael Kerrisk wrote:
>>
>> It has zero downside for *us*.  But it is yet another example of Linux
>> littering the Unix landscape with unnecessary inconsistencies that
>> application writers must deal with.
>
> Bah. Not so. It matters not at all if you try to write portable code.
>
> Linux has extensions.

This a behavior that was unintended by the implementer, wasn't
requested by application writers, isn't present on other Unix systems,
and isn't specified by the standards.

It isn't an extension.  It's an accident.

And the fact that such accidents happen more often than necessary is
the real problem, rather than the fact that this API in particular is
inconsistent with expectations.

> Deal with it. We have literally _thousands_ of
> things that work on Linux but not on other OS's. The fact is, you can't
> just recompile and assume something works, and waitid() has absolutely
> nothing to do with it.
>
>> Well, POSIX.1-2001 is fairly clear:
>>
>>       The  application shall ensure that the infop argument points to
>>       a siginfo_t structure.
>
> Right. So the application should do that, and Linux does the right thing.
> Problem solved.

Right.  And this fact is why, while I incline to think we should fix
the interface, I don't feel strongly about it.

Cheers,

Michael

-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
git://git.kernel.org/pub/scm/docs/man-pages/man-pages.git
man-pages online: http://www.kernel.org/doc/man-pages/online_pages.html
Found a bug? http://www.kernel.org/doc/man-pages/reporting_bugs.html

  reply	other threads:[~2009-01-14  1:39 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <cfd18e0f0901131436ud2cf61bkf0e6b00f4b765bb5@mail.gmail.com>
2009-01-13 22:38 ` waitid() return value strangeness when infop is NULL Michael Kerrisk
2009-01-13 22:43   ` Michael Kerrisk
2009-01-13 22:47   ` Roland McGrath
2009-01-13 22:49     ` [PATCH] sys_waitid: return -EFAULT for NULL Roland McGrath
2009-01-13 23:14       ` Michael Kerrisk
2009-01-13 23:24         ` Andrew Morton
2009-01-13 23:36           ` Michael Kerrisk
2009-01-13 23:47           ` Roland McGrath
2009-01-14  0:13             ` Michael Kerrisk
2009-01-14  0:24               ` Ulrich Drepper
2009-01-14  0:33       ` Linus Torvalds
2009-01-14  0:53         ` Michael Kerrisk
2009-01-14  0:57           ` Linus Torvalds
2009-01-14  1:39             ` Michael Kerrisk [this message]
2009-01-14  2:10               ` Linus Torvalds
2009-01-14  2:28                 ` Michael Kerrisk

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=cfd18e0f0901131739v5119271flc28b5531604e682@mail.gmail.com \
    --to=mtk.manpages@googlemail.com \
    --cc=akpm@linux-foundation.org \
    --cc=drepper@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-man@vger.kernel.org \
    --cc=mtk.manpages@gmail.com \
    --cc=roland@redhat.com \
    --cc=torvalds@linux-foundation.org \
    --cc=vegard.nossum@gmail.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

all inboxes | Powered by JetHome®