mirror of
https://github.com/tmate-io/tmate.git
synced 2025-04-11 13:09:31 +02:00
Unify tmate-debug.c with tmate-ssh-server
This commit is contained in:
parent
9fc6e96444
commit
e5f6e68fad
@ -11,6 +11,7 @@
|
||||
|
||||
void tmate_print_stack_trace(void) {}
|
||||
void tmate_catch_sigsegv(void) {}
|
||||
void tmate_preload_trace_lib(void) {}
|
||||
|
||||
#else
|
||||
|
||||
@ -84,8 +85,7 @@ void tmate_print_stack_trace(void)
|
||||
free (strings);
|
||||
}
|
||||
|
||||
|
||||
static void handle_crash(__unused int sig)
|
||||
static void handle_crash(int sig)
|
||||
{
|
||||
/* TODO send stack trace to server */
|
||||
const char *what = sig == SIGSEGV ? "SIGSEGV" : "SIGABRT";
|
||||
@ -102,4 +102,11 @@ void tmate_catch_sigsegv(void)
|
||||
signal(SIGSEGV, handle_crash);
|
||||
signal(SIGABRT, handle_crash);
|
||||
}
|
||||
|
||||
void tmate_preload_trace_lib(void)
|
||||
{
|
||||
void *array[1];
|
||||
backtrace(array, 1);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user