[calamares] Improve "crash self" functionality
Instead of UB, use POSIX signals and terminate the Calamares process with a recognizable signal number (TRAP, which is highly unusual).
This commit is contained in:
parent
2555b5baf4
commit
9925d6666f
@ -33,14 +33,15 @@
|
||||
#include <QTreeView>
|
||||
#include <QWidget>
|
||||
|
||||
#include <signal.h>
|
||||
|
||||
/**
|
||||
* @brief crash makes Calamares crash immediately.
|
||||
*/
|
||||
static void
|
||||
crash()
|
||||
{
|
||||
volatile int* a = nullptr;
|
||||
*a = 1;
|
||||
kill(getpid(), SIGTRAP);
|
||||
}
|
||||
|
||||
/// @brief Print out the widget tree (names) in indented form.
|
||||
|
Loading…
Reference in New Issue
Block a user