Skip to content

Commit 230b1bb

Browse files
morganchristianssonFlow86
authored andcommitted
Address PR feedback
1 parent f299328 commit 230b1bb

2 files changed

Lines changed: 3 additions & 30 deletions

File tree

libs/s25client/s25client.cpp

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ void WaitForEnter()
8888
if(waited)
8989
return;
9090
waited = true;
91-
bnw::cout << "\n\nPress ENTER to close this window . . ." << std::endl;
91+
bnw::cerr << "\n\nPress ENTER to close this window . . .\n";
9292
bnw::cin.clear();
9393
bnw::cin.ignore(std::numeric_limits<std::streamsize>::max(), '\n');
9494
bnw::cin.get();
@@ -244,39 +244,12 @@ void InstallSignalHandlers()
244244
#endif // _MSC_VER
245245
}
246246

247-
void UninstallSignalHandlers()
248-
{
249-
#ifdef _WIN32
250-
SetConsoleCtrlHandler(ConsoleSignalHandler, FALSE);
251-
#else
252-
struct sigaction sa;
253-
sa.sa_handler = SIG_DFL;
254-
sa.sa_flags = 0; // SA_RESTART would not allow to interrupt connect call;
255-
sigemptyset(&sa.sa_mask);
256-
257-
sigaction(SIGINT, &sa, nullptr);
258-
sigaction(SIGPIPE, &sa, nullptr);
259-
sigaction(SIGALRM, &sa, nullptr);
260-
#endif // _WIN32
261-
262-
#ifdef _MSC_VER
263-
SetUnhandledExceptionFilter(nullptr);
264-
#else
265-
signal(SIGSEGV, SIG_DFL);
266-
#endif
267-
}
268-
269247
/**
270248
* Exit-Handler, wird bei @p exit ausgeführt.
271249
*/
272250
void ExitHandler()
273251
{
274252
Socket::Shutdown();
275-
UninstallSignalHandlers();
276-
277-
#ifdef _DEBUG
278-
WaitForEnter();
279-
#endif
280253
}
281254

282255
void SetAppSymbol()

libs/s25main/SignalHandler.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ void ConsoleSignalHandler(int sig)
3737
if(sig == SIGINT)
3838
{
3939
if(!killme)
40-
boost::nowide::cout << "Do you really want to terminate the program (y/n) : " << std::flush;
40+
boost::nowide::cerr << "Do you really want to terminate the program (y/n) : ";
4141
else
42-
boost::nowide::cout << "Do you really want to kill the program (y/n) : " << std::flush;
42+
boost::nowide::cerr << "Do you really want to kill the program (y/n) : ";
4343

4444
int c = getchar();
4545
if(c == 'j' || c == 'y' || c == 1079565930)

0 commit comments

Comments
 (0)