[Toybox] [PATCH] Improve signal name<->number conversions.

Rob Landley rob at landley.net
Mon Jun 10 13:22:40 PDT 2019


On 6/10/19 10:23 AM, enh via Toybox wrote:
> ping?

Applied.

> -*-
> 
> i did think of a way we could maybe add a test for the real-time
> signals: collect the value from `kill -l SIGRTMAX` and check that
> `kill -l SIGRTMAX-1` is `$((sigrtmax - 1))`. (you might think that
> SIGRTMIN/SIGRTMAX are constants, but SIGRTMIN varies based on how many
> real-time signals the libc implementation has taken for itself, and on
> MIPS at least SIGRTMAX is different. i think the BSDs differ from
> Linux too.)

They're compile time constants, I know they vary by architecture.

> SIGHUP is probably (?) the same everywhere so we could have similar
> for `kill -l HUP` and `kill -l 1`.

I checked the kernel source with "grep -r SIGHUP arch/*/include include | grep
define" and yes, they are. COuldn't tell you about macos.

> given that `kill -l` was broken even for the easy cases before my
> patch, i've at least attached the trivial HUP/1 test...

Also applied.

Rob



More information about the Toybox mailing list