From 006f72c9fe18ea289d6f5a23a31f13e7df2839d7 Mon Sep 17 00:00:00 2001 From: gbeauche <> Date: Sun, 12 Oct 2003 21:21:35 +0000 Subject: [PATCH] Report failure to install the SIGSEGV handler correctly --- BasiliskII/src/Unix/main_unix.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/BasiliskII/src/Unix/main_unix.cpp b/BasiliskII/src/Unix/main_unix.cpp index b9bc8f1d..bcc4826e 100644 --- a/BasiliskII/src/Unix/main_unix.cpp +++ b/BasiliskII/src/Unix/main_unix.cpp @@ -384,8 +384,11 @@ int main(int argc, char **argv) QuitEmulator(); // Install the handler for SIGSEGV - if (!sigsegv_install_handler(sigsegv_handler)) - return false; + if (!sigsegv_install_handler(sigsegv_handler)) { + sprintf(str, GetString(STR_SIG_INSTALL_ERR), "SIGSEGV", strerror(errno)); + ErrorAlert(str); + QuitEmulator(); + } // Register dump state function when we got mad after a segfault sigsegv_set_dump_state(sigsegv_dump_state);