chiark
/
gitweb
/
~mdw
/
disorder
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge tag 'branchpoint-5.1' into release
[disorder]
/
lib
/
signame.c
diff --git
a/lib/signame.c
b/lib/signame.c
index 212ebeee9d3c7cc6cab8f9aec81920fd00ed86f5..316fe6a441fb217e186753d988716f0b741f1934 100644
(file)
--- a/
lib/signame.c
+++ b/
lib/signame.c
@@
-15,7
+15,9
@@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-
+/** @file lib/signame.c
+ * @brief Signal names
+ */
#include "common.h"
#include <signal.h>
#include "common.h"
#include <signal.h>
@@
-24,8
+26,12
@@
#include "table.h"
#include "signame.h"
#include "table.h"
#include "signame.h"
+/** @brief Mapping between signal names and numbers */
static const struct sigtable {
static const struct sigtable {
+ /** @brief Signal number */
int signal;
int signal;
+
+ /* @brief Signal name ("SIGwhatever") */
const char *name;
} signals[] = {
#define S(sig) { sig, #sig }
const char *name;
} signals[] = {
#define S(sig) { sig, #sig }
@@
-132,6
+138,10
@@
static const struct sigtable {
#undef S
};
#undef S
};
+/** @brief Map a signal name to its number
+ * @param s Signal name e.g. "SIGINT"
+ * @return Signal value or -1 if not found
+ */
int find_signal(const char *s) {
int n;
int find_signal(const char *s) {
int n;