From 90ed048532e57791ea4919509edb26bf2a51d53b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?L=C3=A9o=20Lam?= <leo@innovatetechnologi.es>
Date: Sat, 9 Jul 2016 17:38:27 +0200
Subject: [PATCH] DolphinWX: Print a message when we receive a signal

This makes it clear that sending a signal a second time will force stop
Dolphin (which is useful in case the GUI is deadlocked or otherwise
unable to react to the signal).
---
 Source/Core/DolphinWX/Frame.cpp | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

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);