You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be nice to be able to specify --rewrite TERM:HUP rather than using signal numbers.
Unfortunately doesn't look like there is a list of signal names available in any common headers. There's sys_siglist (from string.h), but the names are like Hangup and Interrupt, rather than the short macro names that everyone uses.
From looking at the kill source, they define an array like this:
It's not the absolute worst (they're still using the signal macros, so they don't need to worry about signal numbers not matching the ordering in the file (or it being recompiled on a different architecture with different numbers)).
Is it worth it to do something like this in dumb-init? (or is there a better way?)
The text was updated successfully, but these errors were encountered:
- Adds a mapping of signal numbers to signal names based on the "most common" (subjective) signals.
- This allows the same config/script to be used on different platforms, for example: -r TERM:QUIT (15:3 on Linux vs. 25:20 on OS X).
- Each entry is wrapped in a #ifdef SIG<NAME>/#endif pair in an attempt to make this implementation as portable as possible.
- Names can be specified with or without the SIG prefix, and numbers and names can be used in any combination: -r 15:3, -r TERM:QUIT, -r SIGTERM:3, -r TERM:SIGQUIT, etc.
- Corresponding signum_to_signame() and signame_to_signum() functions were added.
- A new -l/--list option shows the mapping in use on the current system/platform/OS.
- Debug output has been updated to include the signal name along with the number.
FixesYelp#87.
It would be nice to be able to specify
--rewrite TERM:HUP
rather than using signal numbers.Unfortunately doesn't look like there is a list of signal names available in any common headers. There's
sys_siglist
(fromstring.h
), but the names are likeHangup
andInterrupt
, rather than the short macro names that everyone uses.From looking at the
kill
source, they define an array like this:It's not the absolute worst (they're still using the signal macros, so they don't need to worry about signal numbers not matching the ordering in the file (or it being recompiled on a different architecture with different numbers)).
Is it worth it to do something like this in dumb-init? (or is there a better way?)
The text was updated successfully, but these errors were encountered: