From 732212070da308d97cbe1f01118e6b677867a8a0 Mon Sep 17 00:00:00 2001 From: scrawl Date: Thu, 23 Feb 2017 02:39:29 +0100 Subject: [PATCH] crashcatcher: complain when launching gdb fails --- apps/openmw/crashcatcher.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/apps/openmw/crashcatcher.cpp b/apps/openmw/crashcatcher.cpp index a38d301ea..0078ef169 100644 --- a/apps/openmw/crashcatcher.cpp +++ b/apps/openmw/crashcatcher.cpp @@ -160,11 +160,12 @@ static void gdb_info(pid_t pid) printf("Executing: %s\n", cmd_buf); fflush(stdout); - { /* another special exception for "ignoring return value..." */ - int unused; - unused = system(cmd_buf); - UNUSED(unused); - } + int ret = system(cmd_buf); + + if (ret != 0) + printf("\nFailed to create a crash report. Please install 'gdb' and crash again!\n"); + fflush(stdout); + /* Clean up */ remove(respfile); }