diff options
| author | Léo Lam <leo@innovatetechnologi.es> | 2016-07-09 17:38:27 +0200 |
|---|---|---|
| committer | Léo Lam <leo@innovatetechnologi.es> | 2016-07-09 20:27:49 +0200 |
| commit | 90ed048532e57791ea4919509edb26bf2a51d53b (patch) | |
| tree | 3312a227d459b65b0512b41f50251257246fb335 /Source | |
| parent | 59f4d445bbc3c3dbfe6420571ef43731f8af5474 (diff) | |
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).
Diffstat (limited to 'Source')
| -rw-r--r-- | Source/Core/DolphinWX/Frame.cpp | 6 |
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); |
