From: "Michael Kerrisk" <mtk.manpages@googlemail.com>
To: "Ulrich Drepper" <drepper@redhat.com>
Cc: "Michael Kerrisk" <mtk.manpages@googlemail.com>,
"Davide Libenzi" <davidel@xmailserver.org>,
lkml <linux-kernel@vger.kernel.org>,
"Andrew Morton" <akpm@linux-foundation.org>,
"Jakub Jelinek" <jakub@redhat.com>,
"Linus Torvalds" <torvalds@linux-foundation.org>
Subject: Re: Rationale for paccept() sigset argument?
Date: Mon, 8 Sep 2008 15:33:46 +0200 [thread overview]
Message-ID: <cfd18e0f0809080633k3989f514k69dae13063db137b@mail.gmail.com> (raw)
In-Reply-To: <48BCF211.3050809@gmail.com>
Ulrich -- ping!
---------- Forwarded message ----------
From: Michael Kerrisk <mtk.manpages@googlemail.com>
Date: Sep 2, 2008 9:58 AM
Subject: Re: Rationale for paccept() sigset argument?
To: Ulrich Drepper <drepper@gmail.com>
Cc: Michael Kerrisk <mtk.manpages@googlemail.com>, Ulrich Drepper
<drepper@redhat.com>, Davide Libenzi <davidel@xmailserver.org>, lkml
<linux-kernel@vger.kernel.org>, Andrew Morton
<akpm@linux-foundation.org>, Jakub Jelinek <jakub@redhat.com>, Linus
Torvalds <torvalds@linux-foundation.org>
Ulrich Drepper wrote:
> On Wed, Aug 20, 2008 at 9:50 AM, Michael Kerrisk
> <mtk.manpages@googlemail.com> wrote:
>
> > What is the rationale for the sigset argument of paccept()?
> >
>
> accept, like select/poll, is used often as a function to dealy
> operation. Unlike read, recv, etc, which are handled using O_NONBLOCK
> and select/poll. pselect/ppoll do not really have a sigset parameter
> to handle signals in general. You use it to enable special handling
> in case of blocking. Example: if you want to implement userlevel
> context switching, you dedicate a signal to wake up any blocked
> thread. Since accept falls more into the same category than poll,
> this means the sigset parameter is justified. In theory we could add
> it to all functions but there is no reason to do this without any
> other reason to change the interface.
>
Ulrich, you snipped a relevant piece of my earlier message:
[[
> * It seems to me that any case where we might want to use paccept() could be
> equivalently dealt with using the existing pselect()/ppoll()/epoll_pwait()
> followed by a conventional accept() if the listening file descriptor
> indicates as ready.
]]
So I'll rephrase: what use case does the sigset argument of paccept()
allow us to handle that couldn't equally have been handled by
pselect()/ppoll()/epoll_pwait() + traditional accept()?
Cheers,
Michael
next prev parent reply other threads:[~2008-09-08 13:33 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-20 16:50 Michael Kerrisk
2008-08-29 20:45 ` Michael Kerrisk
2008-09-02 0:48 ` Ulrich Drepper
2008-09-02 7:58 ` Michael Kerrisk
2008-09-08 13:33 ` Michael Kerrisk [this message]
2008-09-11 5:48 ` 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=cfd18e0f0809080633k3989f514k69dae13063db137b@mail.gmail.com \
--to=mtk.manpages@googlemail.com \
--cc=akpm@linux-foundation.org \
--cc=davidel@xmailserver.org \
--cc=drepper@redhat.com \
--cc=jakub@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mtk.manpages@gmail.com \
--cc=torvalds@linux-foundation.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
all inboxes | Powered by JetHome®