diff options
author | Elliott Hughes <enh@google.com> | 2019-06-11 14:57:06 -0700 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2019-06-11 17:23:08 -0500 |
commit | 9d354377a8aea69e19b1785eec32066519052e97 (patch) | |
tree | cbe944a4b3fe8c89e7caa2338d566f84bdd7befd /lib/portability.h | |
parent | 047be9a36e8b2243d0b06a722df72dc3fbc97bf5 (diff) | |
download | toybox-9d354377a8aea69e19b1785eec32066519052e97.tar.gz |
Move sig_to_num and num_to_sig into portability.c.
macOS doesn't have real-time signals, and it has a slightly different
set of non-portable signals from Linux.
With this, the toybox `kill -l` output matches the default macOS kill(1).
Diffstat (limited to 'lib/portability.h')
-rw-r--r-- | lib/portability.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/portability.h b/lib/portability.h index c955eddf..69580da5 100644 --- a/lib/portability.h +++ b/lib/portability.h @@ -332,3 +332,12 @@ int xnotify_wait(struct xnotify *not, char **path); #ifdef __APPLE__ #define f_frsize f_iosize #endif + +int sig_to_num(char *s); +char *num_to_sig(int sig); + +struct signame { + int num; + char *name; +}; +void xsignal_all_killers(void *handler); |