[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <cfd18e0f0809080631i456c4754l8bbbe6953e3e841f@mail.gmail.com>
Date: Mon, 8 Sep 2008 15:31:55 +0200
From: "Michael Kerrisk" <mtk.manpages@...glemail.com>
To: "Ulrich Drepper" <drepper@...hat.com>
Cc: "Davide Libenzi" <davidel@...ilserver.org>,
"Andrew Morton" <akpm@...ux-foundation.org>,
lkml <linux-kernel@...r.kernel.org>,
"Linus Torvalds" <torvalds@...ux-foundation.org>
Subject: Re: paccept() oddity
Ulrich -- ping!
---------- Forwarded message ----------
From: Michael Kerrisk <mtk.manpages@...glemail.com>
Date: Aug 29, 2008 10:45 PM
Subject: Re: paccept() oddity
To: Ulrich Drepper <drepper@...hat.com>
Cc: Davide Libenzi <davidel@...ilserver.org>, Andrew Morton
<akpm@...ux-foundation.org>, lkml <linux-kernel@...r.kernel.org>,
Linus Torvalds <torvalds@...ux-foundation.org>
Ulrich -- Ping!
On Wed, Aug 20, 2008 at 6:50 PM, Michael Kerrisk
<mtk.manpages@...glemail.com> wrote:
> Ulrich,
>
> [
> 2.6.27-rc has paccept():
>
> int paccept(int fd, struct sockaddr *sockaddr, socklen_t *addrlen,
> const sigset_t *sigmask, int setsize, int flags)
> ]
>
> While considering the sigset argument for paccept() (see my previous
> message), and testing that system call, I realized that there is a certain
> oddness in the implementation of paccept().
>
> Like accept(), paccept() automatically restarts if interrupted by a signal
> handler that was established with the SA_RESTART flag.
>
> On the other hand, pselect(), ppoll(), and epoll_pwait() are never restarted
> if interrupted by a handler, even if the handler was established with
> SA_RESTART. (This is the same as with select(), poll(), and epoll_wait().)
>
> It seems to me that it makes little sense to restart paccept(), especially
> in
> the case where it is interrupted by a handler for one of the signals that is
> in sigmask, since the whole point of calling paccept() is to block until a
> connection is received, or until one of the signals in sigmask is caught().
>
> How about changing paccept() so that it is never automatically restarted if
> interrupted by a signal handler, regardless of the SA_RESTART flag. (In
> other words, paccept() should be consistent with pselect(), ppoll(), and
> epoll_pwait(), rather than being consistent with accept().) What are your
> thoughts?
>
> Cheers,
>
> Michael
>
>
--
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
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
--
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists