Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20181212051559.GA3315@voyager>
Date: Wed, 12 Dec 2018 06:15:59 +0100
From: Markus Wichmann <nullplan@....net>
To: musl@...ts.openwall.com
Subject: Re: sem_wait and EINTR

On Tue, Dec 11, 2018 at 07:32:38PM -0500, Rich Felker wrote:
> One other thought: would it be preferable for the EINTR suppression in
> the absence of interruptible signal handlers to be in __timedwait
> rather than sem_timedwait? Then any code using __timedwait would
> benefit from it. I'm not sure if there are other callers where it
> would help but it wouldn't hurt either.
> 
> Rich

Nope, that would not help. I had a look at all users of SYS_futex that
might be impacted by the kernel bug you mentioned (and followed them
back to the public interfaces that use them). Only __timedwait does
anything with the return value at all, and of all the users of
__timedwait(), sem_timedwait() is the only function even specified to
return EINTR. All others are specified to *never* return EINTR. At least
according to the manpages I have here (manpages-posix).

So only sem_timedwait() needs this patch. For the other users it would
hurt conformance.

Ciao,
Markus

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.