]> mj.ucw.cz Git - libucw.git/blob - ucw/signames.h
Table: Shuffle functions to form thematic blocks
[libucw.git] / ucw / signames.h
1 /*
2  *      A List of Signal Names
3  *
4  *      (c) 2012 Martin Mares <mj@ucw.cz>
5  */
6
7 #ifndef _UCW_SIGNAMES_H
8 #define _UCW_SIGNAMES_H
9
10 #ifdef CONFIG_UCW_CLEAN_ABI
11 #define sig_name_to_number ucw_sig_name_to_number
12 #define sig_number_to_name ucw_sig_number_to_name
13 #endif
14
15 /***
16  * POSIX lacks facilities for conversion between signal names
17  * and signal numbers. They are available in LibUCW, but please
18  * be aware that some signals might be missing on your system.
19  * If they do, please notify LibUCW maintainers.
20  *
21  * The GNU C Library provides `strsignal()` with similar function,
22  * but it returns human-readable strings like "Segmentation fault".
23  ***/
24
25 /**
26  * Converts signal name to the corresponding number.
27  * Returns -1 if not found.
28  **/
29 int sig_name_to_number(const char *name);
30
31 /**
32  * Converts signal number to the corresponding name.
33  * If more names are known for the given signal, one of them
34  * is considered canonical and preferred.
35  * Returns NULL if not found.
36  **/
37 const char *sig_number_to_name(int number);
38
39 #endif