Debugger: In CLI mode block SIGINT in all threads
It is supposed to be handled in the input loop thread only (eventually).
This commit is contained in:
parent
71e5d26b5f
commit
f58478507c
@ -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.
|
* Copyright 2011, Rene Gollent, rene@gollent.com.
|
||||||
* Distributed under the terms of the MIT License.
|
* Distributed under the terms of the MIT License.
|
||||||
*/
|
*/
|
||||||
@ -24,6 +24,7 @@
|
|||||||
#include "GraphicalUserInterface.h"
|
#include "GraphicalUserInterface.h"
|
||||||
#include "MessageCodes.h"
|
#include "MessageCodes.h"
|
||||||
#include "SettingsManager.h"
|
#include "SettingsManager.h"
|
||||||
|
#include "SignalSet.h"
|
||||||
#include "TeamDebugger.h"
|
#include "TeamDebugger.h"
|
||||||
#include "TeamsWindow.h"
|
#include "TeamsWindow.h"
|
||||||
#include "TypeHandlerRoster.h"
|
#include "TypeHandlerRoster.h"
|
||||||
@ -558,6 +559,11 @@ CliDebugger::~CliDebugger()
|
|||||||
bool
|
bool
|
||||||
CliDebugger::Run(const Options& options)
|
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
|
// initialize global objects and settings manager
|
||||||
status_t error = global_init();
|
status_t error = global_init();
|
||||||
if (error != B_OK) {
|
if (error != B_OK) {
|
||||||
|
Loading…
Reference in New Issue
Block a user