From mboxrd@z Thu Jan 1 00:00:00 1970 From: Torvald Riegel Subject: Re: futex(2) man page update help request Date: Sat, 24 Jan 2015 14:12:22 +0100 Message-ID: <1422105142.29655.16.camel@triegel.csb> References: <537346E5.4050407@gmail.com> <5373D0CA.2050204@redhat.com> <54B7D87C.3090901@gmail.com> <1422037788.29655.0.camel@triegel.csb> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Sender: linux-man-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Thomas Gleixner Cc: "Michael Kerrisk (man-pages)" , Carlos O'Donell , Darren Hart , Ingo Molnar , Jakub Jelinek , "linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , lkml , Arnd Bergmann , Steven Rostedt , Peter Zijlstra , Linux API , Darren Hart , Anton Blanchard , Eric Dumazet , bill o gallmeister , Jan Kiszka , Daniel Wagner , Rich Felker List-Id: linux-api@vger.kernel.org On Sat, 2015-01-24 at 12:35 +0100, Thomas Gleixner wrote: > So we should never see -EINTR in the case of a spurious wakeup here. > > But, here is the not so good news: > > I did some archaeology. The restart handling of futex_wait() got > introduced in kernel 2.6.22, so anything older than that will have > the spurious -EINTR issues. > > futex_wait_pi() always had the restart handling and glibc folks back > then (2006) requested that it should never return -EINTR, so it > unconditionally restarts the syscall whether a signal had been > delivered or not. > > So kernels >= 2.6.22 should never return -EINTR spuriously. If that > happens it's a bug and needs to be fixed. Thanks for looking into this. Michael, can you include the above in the documentation please? This is useful for userspace code like glibc that expects a minimum kernel version. Thanks! -- To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html