Merge pull request #3993 from leoetlino/signal-message
DolphinWX: Print a message when a signal is received
This commit is contained in:
commit
ece5de24bc
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue