rc

[fork] interactive rc shell
Log | Files | Refs | README | LICENSE

commit 89fa9aae7d63afb2829987c6b4058fb42f03ce37
parent 592d9f333cde3f5263453c34d58c82708a91224c
Author: Bert Münnich <ber.t@posteo.de>
Date:   Tue,  1 May 2018 16:21:58 +0200

Correctly name real-time signals

Also make names of unknown signals use fmt 'sig%d' instead of 'sigunknown%d'.

Diffstat:
Mmksignal.c | 7++++++-
1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/mksignal.c b/mksignal.c @@ -223,8 +223,13 @@ int main(void) { if (snp->signo) fprintf(outf, "\t{\"%s\",\t\"%s\"},\n", snp->signame, snp->sigmsg); +#if defined(SIGRTMIN) && defined(SIGRTMAX) + else if (s >= SIGRTMIN && s <= SIGRTMAX) + fprintf(outf, "\t{\"sigrt%d\",\t\"real-time signal %d\"},\n", + s - SIGRTMIN, s - SIGRTMIN); +#endif else - fprintf(outf, "\t{\"sigunknown%d\",\t\"unknown signal %d\"},\n", + fprintf(outf, "\t{\"sig%d\",\t\"unknown signal %d\"},\n", s, s); } fprintf(outf, "};\n");