Re: [patch] pthread_cond_wait and pthread_cond_timedwait can also return EPERMignalignal

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* 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.




[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux