Re: [PATCH] nptl: Retry SIGSETXID delivery on EAGAIN in setxid (bug 21108)

Florian Weimer <[email protected]>
Newsgroups gmane.comp.lib.glibc.alpha
Message-ID <[email protected]>
* Adhemerval Zanella:

> setxid_signal_thread assumed tgkill could only fail if the target
> thread had not started yet or had already exited, and treated any error
> as "thread is gone".  But SIGSETXID is a realtime signal, and for those
> the tgkill may fail with with EAGAIN once the per-real-user
> RLIMIT_SIGPENDING limit is reached (process-directed kill uses the
> guaranteed delivery override, but a thread-directed tgkill cannot.)

I have not reviewed the patch yet, but I want to share an idea: Using
si_value with a random cookie to detect stray signals.  Unfortunately,
that doesn't help because the queue is not signal-specific (or
process-specific).  So it doesn't simplify the implementation if we
terminate the process on a stray SIGSETXID signal: it's possible to
queue up signals with the help of a completely different process.

Thanks,
Florian
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.