diff options
| author | Dave Hibberd <hibby@debian.org> | 2025-01-06 21:26:32 +0000 |
|---|---|---|
| committer | Dave Hibberd <hibby@debian.org> | 2025-01-06 21:26:32 +0000 |
| commit | 5105f0adf3ed5d0934165176ba7310c015ca1ad1 (patch) | |
| tree | 2ba3841a6bd66731dd4c867920dd7e19b21cd0e9 /LinBPQ.c | |
| parent | b060bf5d391262053e28a3771bdcbc781a24e92b (diff) | |
| parent | a5c4d344ccf55a47fd6bc91a327073915b6c281e (diff) | |
Update upstream source from tag 'upstream/6.0.24.56+repack'
Update to upstream version '6.0.24.56+repack'
with Debian dir 5e2bea687a0c7db9e9237257026ffe37159d9e93
Diffstat (limited to 'LinBPQ.c')
| -rw-r--r-- | LinBPQ.c | 27 |
1 files changed, 27 insertions, 0 deletions
@@ -371,8 +371,28 @@ BOOL CtrlHandler(DWORD fdwCtrlType) #else
+#include <execinfo.h>
+#include <signal.h>
+
+
// Linux Signal Handlers
+
+static void segvhandler(int sig)
+{
+ void *array[10];
+ size_t size;
+
+ // get void*'s for all entries on the stack
+ size = backtrace(array, 10);
+
+ // print out all the frames to stderr
+ fprintf(stderr, "Error: signal %d:\n", sig);
+ backtrace_symbols_fd(array, size, STDERR_FILENO);
+ exit(1);
+}
+
+
static void sigterm_handler(int sig)
{
syslog(LOG_INFO, "terminating on SIGTERM\n");
@@ -554,6 +574,8 @@ extern int POP3Timer; #ifndef WIN32
+
+
#define _getch getchar
/**
@@ -738,6 +760,8 @@ char HelpScreen[] = int Redirected = 0;
+static void segvhandler(int sig);
+
int main(int argc, char * argv[])
{
int i;
@@ -767,6 +791,9 @@ int main(int argc, char * argv[]) }
#else
+
+// signal(SIGSEGV, segvhandler);
+
setlinebuf(stdout);
struct sigaction act;
openlog("LINBPQ", LOG_PID, LOG_DAEMON);
|
