Download raw body.
readpassphrase(3): avoid spin on ignored signals
On Tue, 15 Sep 2026 17:20:22 +1000, Damien Miller wrote:
> Something like the below?
That looks reasonable, though the special case for "old == NULL" makes
me a little uncomfortable. Another alternative would be:
/* Like sigaction(2) but preserves SIG_IGN */
static void
sigaction_except_ign(int signum, struct sigaction *act, struct sigaction *old)
{
struct sigaction sabuf;
if (old == NULL)
old = &sabuf;
(void)sigaction(signum, act, old);
/* Reinstate SIG_IGN; we don't want to override this */
if (old->sa_handler == SIG_IGN && act->sa_handler != SIG_IGN)
(void)sigaction(signum, old, NULL);
}
readpassphrase(3): avoid spin on ignored signals