From f58478507cd4406bd5b2ddb415f4f6cb43456a86 Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Fri, 27 Jul 2012 22:57:17 +0200 Subject: [PATCH] Debugger: In CLI mode block SIGINT in all threads It is supposed to be handled in the input loop thread only (eventually). --- src/apps/debugger/Debugger.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/apps/debugger/Debugger.cpp b/src/apps/debugger/Debugger.cpp index bac8ac0d13..888db4acf5 100644 --- a/src/apps/debugger/Debugger.cpp +++ b/src/apps/debugger/Debugger.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de. + * Copyright 2009-2012, Ingo Weinhold, ingo_weinhold@gmx.de. * Copyright 2011, Rene Gollent, rene@gollent.com. * Distributed under the terms of the MIT License. */ @@ -24,6 +24,7 @@ #include "GraphicalUserInterface.h" #include "MessageCodes.h" #include "SettingsManager.h" +#include "SignalSet.h" #include "TeamDebugger.h" #include "TeamsWindow.h" #include "TypeHandlerRoster.h" @@ -558,6 +559,11 @@ CliDebugger::~CliDebugger() bool CliDebugger::Run(const Options& options) { + // Block SIGINT, in this thread so all threads created by it inherit the + // a block mask with the signal blocked. In the input loop the signal will + // be unblocked again. + SignalSet(SIGINT).BlockInCurrentThread(); + // initialize global objects and settings manager status_t error = global_init(); if (error != B_OK) {