From: Ben Pfaff Date: Sat, 2 Oct 2010 19:01:50 +0000 (-0700) Subject: pspp: Avoid printing multiple messages for a single signal caused by a bug. X-Git-Tag: v0.7.6~124 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8af858910fe5d4166089d8f5d55ba8debe441617;p=pspp-builds.git pspp: Avoid printing multiple messages for a single signal caused by a bug. When I tested commit 38f3d1b22 "pspp: Make a signal that indicates a bug re-raise that signal to exit" I didn't read the output carefully enough. John Darrington pointed out the problem. --- diff --git a/src/ui/terminal/main.c b/src/ui/terminal/main.c index 7d2c97f9..fa99fe1a 100644 --- a/src/ui/terminal/main.c +++ b/src/ui/terminal/main.c @@ -166,12 +166,16 @@ bug_handler(int sig) { case SIGABRT: request_bug_report("Assertion Failure/Abort"); + break; case SIGFPE: request_bug_report("Floating Point Exception"); + break; case SIGSEGV: request_bug_report("Segmentation Violation"); + break; default: request_bug_report("Unknown"); + break; } /* Re-raise the signal so that we terminate with the correct status. */