This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 5/5] Factor out shared definitions from bits/signum.h.
- From: Florian Weimer <fweimer at redhat dot com>
- To: Zack Weinberg <zackw at panix dot com>, libc-alpha at sourceware dot org
- Date: Wed, 7 Jun 2017 09:08:35 +0200
- Subject: Re: [PATCH 5/5] Factor out shared definitions from bits/signum.h.
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx05.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx05.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=fweimer at redhat dot com
- Dkim-filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 8D23A1555C
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 8D23A1555C
- References: <20170605134524.6460-1-zackw@panix.com> <20170605134524.6460-6-zackw@panix.com>
On 06/05/2017 03:45 PM, Zack Weinberg wrote:
> +* The obsolete signal constants SIGSTKFLT and SIGUNUSED are no longer
> + defined by <signal.h>. No supported version of the Linux kernel
> + generates these signals, on any architecture.
But can't you use these signals like SIGUSR1 and SIGUSR2? It certainly
works this way:
rt_sigaction(SIGSTKFLT, {sa_handler=0x4006f0, sa_mask=[],
sa_flags=SA_RESTORER, sa_restorer=0x7ff27215d990}, NULL, 8) = 0
getpid() = 28291
kill(28291, SIGSTKFLT) = 0
--- SIGSTKFLT {si_signo=SIGSTKFLT, si_code=SI_USER, si_pid=28291,
si_uid=1000} ---
write(1, "handler called\n", 15handler called
) = 15
If we can reserve yet another signal, we could abuse the blocked/not
blocked flag as an indicator whether we are running in a signal handler
or not. But I'm not sure if this is a good idea.
Florian