diff options
| author | Dave Hibberd <hibby@debian.org> | 2025-05-21 21:33:52 +0100 |
|---|---|---|
| committer | Dave Hibberd <hibby@debian.org> | 2025-05-21 21:33:52 +0100 |
| commit | 0d3ee7fd56efa24ba652fbc17f98dd10458e8054 (patch) | |
| tree | 3ee81c17c041f6aeba3492c805c11ed0192839dc /LinBPQ.c | |
| parent | 96197688e7b79553d45e0b6a5e760c2d80604862 (diff) | |
New upstream version 6.0.24.71+repackupstream/6.0.24.71+repack
Diffstat (limited to 'LinBPQ.c')
| -rw-r--r-- | LinBPQ.c | 45 |
1 files changed, 27 insertions, 18 deletions
@@ -381,41 +381,48 @@ BOOL CtrlHandler(DWORD fdwCtrlType) #include <signal.h>
// Linux Signal Handlers
-
static void segvhandler(int sig)
{
- void *array[10];
- size_t size;
- char msg[] = "SIGSEGV Received\n";
+ void *array[10];
+ size_t size;
+ char msg[] = "\nSIGSEGV Received\n";
+
+ write(STDERR_FILENO, msg, strlen(msg));
- write(STDERR_FILENO, msg, strlen(msg));
+ // get void*'s for all entries on the stack
+ size = backtrace(array, 10);
- // get void*'s for all entries on the stack
- size = backtrace(array, 10);
+ // print out all the frames to stderr
- // print out all the frames to stderr
+ backtrace_symbols_fd(array, size, STDERR_FILENO);
- backtrace_symbols_fd(array, size, STDERR_FILENO);
+ write(STDOUT_FILENO, msg, strlen(msg));
+ backtrace_symbols_fd(array, size, STDOUT_FILENO);
- exit(1);
+ exit(1);
}
static void abrthandler(int sig)
{
- void *array[10];
- size_t size;
- char msg[] = "SIGABRT Received\n";
+ void *array[10];
+ size_t size;
+ char msg[] = "\nSIGABRT Received\n";
+
+ write(STDERR_FILENO, msg, strlen(msg));
+ write(STDOUT_FILENO, msg, strlen(msg));
- write(STDERR_FILENO, msg, strlen(msg));
+ // get void*'s for all entries on the stack
- // get void*'s for all entries on the stack
+ size = backtrace(array, 10);
+ backtrace_symbols_fd(array, size, STDERR_FILENO);
- size = backtrace(array, 10);
- backtrace_symbols_fd(array, size, STDERR_FILENO);
+ write(STDOUT_FILENO, msg, strlen(msg));
+ backtrace_symbols_fd(array, size, STDOUT_FILENO);
- exit(1);
+ exit(1);
}
+
static void sigterm_handler(int sig)
{
syslog(LOG_INFO, "terminating on SIGTERM\n");
@@ -847,6 +854,8 @@ int main(int argc, char * argv[]) printf("G8BPQ AX25 Packet Switch System Version %s %s\n", TextVerstring, Datestring);
printf("%s\n", VerCopyright);
+ srand(time(NULL));
+
// look for optarg format parameters
|
