[PATCH v2 09/19] nptl: Fix race between pthread_kill and thread exit (bug 12889)

Florian Weimer fweimer@redhat.com
Mon Aug 30 09:25:13 GMT 2021


* Adhemerval Zanella:

>> This needs a comment explaining that *all* pending signals are delivered
>> at the point of the __libc_signal_restore_set call.  I hope that this is
>> actually what happens in Linux; POSIX only guarantees that for one
>> pending signal that is unblocked.
>
> My understanding from kernel/signal.c all pending signals are delivered
> with the signal mask restore, but only real-time one are queued (and
> subjected to RLIMIT_SIGPENDING, which causes another issue [1]).

If real-time signals are special, I think we need to change the way we
handle the self-signal case and avoid the lock there.

Thanks,
Florian



More information about the Libc-alpha mailing list