summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorPierre Bourdon <delroth@gmail.com>2016-07-09 20:46:54 +0200
committerGitHub <noreply@github.com>2016-07-09 20:46:54 +0200
commitece5de24bcfcbf03109de5d5a86b49abd03a89be (patch)
tree3312a227d459b65b0512b41f50251257246fb335 /Source
parent59f4d445bbc3c3dbfe6420571ef43731f8af5474 (diff)
parent90ed048532e57791ea4919509edb26bf2a51d53b (diff)
Merge pull request #3993 from leoetlino/signal-message
DolphinWX: Print a message when a signal is received
Diffstat (limited to 'Source')
-rw-r--r--Source/Core/DolphinWX/Frame.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/Source/Core/DolphinWX/Frame.cpp b/Source/Core/DolphinWX/Frame.cpp
index 91c159229b..c785fe0dd2 100644
--- a/Source/Core/DolphinWX/Frame.cpp
+++ b/Source/Core/DolphinWX/Frame.cpp
@@ -537,7 +537,11 @@ CFrame::CFrame(wxFrame* parent, wxWindowID id, const wxString& title, const wxPo
#if defined(__unix__) || defined(__unix) || defined(__APPLE__)
struct sigaction sa;
- sa.sa_handler = [](int unused) { s_shutdown_signal_received.Set(); };
+ sa.sa_handler = [](int unused) {
+ char message[] = "A signal was received. A second signal will force Dolphin to stop.\n";
+ write(STDERR_FILENO, message, sizeof(message));
+ s_shutdown_signal_received.Set();
+ };
sigemptyset(&sa.sa_mask);
sa.sa_flags = SA_RESETHAND;
sigaction(SIGINT, &sa, nullptr);