From: Florian Weimer <fw@deneb.enyo.de>
To: Jan Kratochvil <jan@jankratochvil.net>
Cc: Alejandro Colomar <alx@kernel.org>, linux-man@vger.kernel.org
Subject: Re: [patch] pthread_cond_wait and pthread_cond_timedwait can also return EPERMignalignal
Date: Thu, 10 Oct 2024 14:25:56 +0200 [thread overview]
Message-ID: <87ttdkdu0b.fsf@mid.deneb.enyo.de> (raw)
In-Reply-To: <Zwe-ipF5N82CTN64@host2.jankratochvil.net> (Jan Kratochvil's message of "Thu, 10 Oct 2024 19:46:18 +0800")
* Jan Kratochvil:
> On Thu, 10 Oct 2024 18:32:51 +0800, Florian Weimer wrote:
>> * Jan Kratochvil:
>>
>> > +\fBEINTR\fP
>> > +\fBpthread_cond_wait\fP was interrupted by a signal.
>> > +.RE
>>
>> POSIX specifically disallows returning EINTR. Applications cannot
>> expect that pthread_cond_wait returns upon delivery of a signal. Such
>> a return is only possible due to the general allowance for spurious
>> wakeups, and must result in a zero result.
>
> OK, I agree when I tried that. So I have removed this part.
>
> But then I believe the EINTR presence at pthread_cond_timedwait documentation
> is also wrong (I did not change that in this patch) as I could not reproduce
> the EINTR (attached).
Indeed, POSIX disallows EINTR for all three wait functions.
next prev parent reply other threads:[~2024-10-10 12:25 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-09 12:53 [patch] pthread_cond_wait and pthread_cond_timedwait can also return EPERM Jan Kratochvil
2024-10-10 10:32 ` Florian Weimer
2024-10-10 11:46 ` [patch] pthread_cond_wait and pthread_cond_timedwait can also return EPERMignalignal Jan Kratochvil
2024-10-10 12:25 ` Florian Weimer [this message]
2024-10-10 12:39 ` [patchv3] pthread_cond_wait and pthread_cond_timedwait can also return EPERM Jan Kratochvil
2024-11-01 13:10 ` Alejandro Colomar
2024-11-01 13:16 ` Alejandro Colomar
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=87ttdkdu0b.fsf@mid.deneb.enyo.de \
--to=fw@deneb.enyo.de \
--cc=alx@kernel.org \
--cc=jan@jankratochvil.net \
--cc=linux-man@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.