mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-07 07:14:56 +01:00
Early exit plugin-scanner on crash
This also prevents the macOS crash-reporter from showing up.
This commit is contained in:
parent
209d8b877e
commit
92d8a270a8
3 changed files with 15 additions and 3 deletions
|
|
@ -24,6 +24,7 @@
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <strings.h>
|
#include <strings.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
|
||||||
#include "pbd/error.h"
|
#include "pbd/error.h"
|
||||||
#include "pbd/transmitter.h"
|
#include "pbd/transmitter.h"
|
||||||
|
|
@ -102,7 +103,9 @@ sig_handler (int sig)
|
||||||
printf ("Error: signal %d\n ---8<---\n", sig);
|
printf ("Error: signal %d\n ---8<---\n", sig);
|
||||||
PBD::stacktrace (std::cout, 15, 2);
|
PBD::stacktrace (std::cout, 15, 2);
|
||||||
printf (" --->8---\n");
|
printf (" --->8---\n");
|
||||||
::exit (EXIT_FAILURE);
|
fflush(stdout);
|
||||||
|
fflush(stderr);
|
||||||
|
_exit (EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
@ -200,6 +203,7 @@ main (int argc, char **argv)
|
||||||
signal (SIGSEGV, sig_handler);
|
signal (SIGSEGV, sig_handler);
|
||||||
signal (SIGBUS, sig_handler);
|
signal (SIGBUS, sig_handler);
|
||||||
signal (SIGILL, sig_handler);
|
signal (SIGILL, sig_handler);
|
||||||
|
signal (SIGABRT, sig_handler);
|
||||||
|
|
||||||
bool err = false;
|
bool err = false;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,7 @@
|
||||||
#include <getopt.h>
|
#include <getopt.h>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
#include <unistd.h>
|
||||||
|
|
||||||
#ifdef PLATFORM_WINDOWS
|
#ifdef PLATFORM_WINDOWS
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
|
@ -147,7 +148,9 @@ sig_handler (int sig)
|
||||||
printf ("Error: signal %d\n ---8<---\n", sig);
|
printf ("Error: signal %d\n ---8<---\n", sig);
|
||||||
PBD::stacktrace (std::cout, 15, 2);
|
PBD::stacktrace (std::cout, 15, 2);
|
||||||
printf (" --->8---\n");
|
printf (" --->8---\n");
|
||||||
::exit (EXIT_FAILURE);
|
fflush(stdout);
|
||||||
|
fflush(stderr);
|
||||||
|
_exit (EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
@ -258,6 +261,7 @@ main (int argc, char **argv)
|
||||||
signal (SIGSEGV, sig_handler);
|
signal (SIGSEGV, sig_handler);
|
||||||
signal (SIGBUS, sig_handler);
|
signal (SIGBUS, sig_handler);
|
||||||
signal (SIGILL, sig_handler);
|
signal (SIGILL, sig_handler);
|
||||||
|
signal (SIGABRT, sig_handler);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
while (optind < argc) {
|
while (optind < argc) {
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,7 @@
|
||||||
#include <getopt.h>
|
#include <getopt.h>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
#include <unistd.h>
|
||||||
|
|
||||||
#ifdef PLATFORM_WINDOWS
|
#ifdef PLATFORM_WINDOWS
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
|
@ -134,7 +135,9 @@ sig_handler (int sig)
|
||||||
printf ("Error: signal %d\n ---8<---\n", sig);
|
printf ("Error: signal %d\n ---8<---\n", sig);
|
||||||
PBD::stacktrace (std::cout, 15, 2);
|
PBD::stacktrace (std::cout, 15, 2);
|
||||||
printf (" --->8---\n");
|
printf (" --->8---\n");
|
||||||
::exit (EXIT_FAILURE);
|
fflush(stdout);
|
||||||
|
fflush(stderr);
|
||||||
|
_exit (EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
@ -243,6 +246,7 @@ main (int argc, char **argv)
|
||||||
signal (SIGSEGV, sig_handler);
|
signal (SIGSEGV, sig_handler);
|
||||||
signal (SIGBUS, sig_handler);
|
signal (SIGBUS, sig_handler);
|
||||||
signal (SIGILL, sig_handler);
|
signal (SIGILL, sig_handler);
|
||||||
|
signal (SIGABRT, sig_handler);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
bool err = false;
|
bool err = false;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue