Add OpenBSD signals

This commit is contained in:
Michael McConville 2015-10-06 11:25:16 -04:00
parent 3fe2f3e28e
commit 77f12bbecd
2 changed files with 44 additions and 0 deletions

View File

@ -16,6 +16,7 @@ in the source distribution for its full text.
#include "UptimeMeter.h" #include "UptimeMeter.h"
#include "ClockMeter.h" #include "ClockMeter.h"
#include "HostnameMeter.h" #include "HostnameMeter.h"
#include "SignalsPanel.h"
#include "OpenBSDProcess.h" #include "OpenBSDProcess.h"
#include "OpenBSDProcessList.h" #include "OpenBSDProcessList.h"
@ -94,6 +95,44 @@ ProcessField Platform_defaultFields[] = { PID, USER, PRIORITY, NICE, M_SIZE, M_R
int Platform_numberOfFields = LAST_PROCESSFIELD; int Platform_numberOfFields = LAST_PROCESSFIELD;
SignalItem Platform_signals[] = {
{ .name = " 0 Cancel", .number = 0 },
{ .name = " 1 SIGHUP", .number = 1 },
{ .name = " 2 SIGINT", .number = 2 },
{ .name = " 3 SIGQUIT", .number = 3 },
{ .name = " 4 SIGILL", .number = 4 },
{ .name = " 5 SIGTRAP", .number = 5 },
{ .name = " 6 SIGABRT", .number = 6 }, /* a.k.a. SIGIOT */
{ .name = " 7 SIGEMT", .number = 7 },
{ .name = " 8 SIGFPE", .number = 8 },
{ .name = " 9 SIGKILL", .number = 9 },
{ .name = "10 SIGBUS", .number = 10 },
{ .name = "11 SIGSEGV", .number = 11 },
{ .name = "12 SIGSYS", .number = 12 },
{ .name = "13 SIGPIPE", .number = 13 },
{ .name = "14 SIGALRM", .number = 14 },
{ .name = "15 SIGTERM", .number = 15 },
{ .name = "16 SIGURG", .number = 16 },
{ .name = "17 SIGSTOP", .number = 17 },
{ .name = "18 SIGTSTP", .number = 18 },
{ .name = "19 SIGCONT", .number = 19 },
{ .name = "20 SIGCHLD", .number = 20 },
{ .name = "21 SIGTTIN", .number = 21 },
{ .name = "22 SIGTTOU", .number = 22 },
{ .name = "23 SIGIO", .number = 23 },
{ .name = "24 SIGXCPU", .number = 24 },
{ .name = "25 SIGXFSZ", .number = 25 },
{ .name = "26 SIGVTALRM", .number = 26 },
{ .name = "27 SIGPROF", .number = 27 },
{ .name = "28 SIGWINCH", .number = 28 },
{ .name = "29 SIGINFO", .number = 29 },
{ .name = "30 SIGUSR1", .number = 30 },
{ .name = "31 SIGUSR2", .number = 31 },
{ .name = "32 SIGTHR", .number = 32 },
};
unsigned int Platform_numberOfSignals = sizeof(Platform_signals)/sizeof(SignalItem);
void Platform_setBindings(Htop_Action* keys) { void Platform_setBindings(Htop_Action* keys) {
(void) keys; (void) keys;
} }

View File

@ -12,6 +12,7 @@ in the source distribution for its full text.
#include "Action.h" #include "Action.h"
#include "BatteryMeter.h" #include "BatteryMeter.h"
#include "SignalsPanel.h"
extern ProcessFieldData Process_fields[]; extern ProcessFieldData Process_fields[];
@ -35,6 +36,10 @@ extern ProcessField Platform_defaultFields[];
extern int Platform_numberOfFields; extern int Platform_numberOfFields;
extern SignalItem Platform_signals[];
extern unsigned int Platform_numberOfSignals;
void Platform_setBindings(Htop_Action* keys); void Platform_setBindings(Htop_Action* keys);
extern MeterClass* Platform_meterTypes[]; extern MeterClass* Platform_meterTypes[];