mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-22 02:32:36 +01:00
Adds SIGPIPE to ignored exceptions(unix)
This commit is contained in:
parent
3888b0429c
commit
1378645413
@ -1789,6 +1789,10 @@ static void signal_handler(int sig, siginfo_t* info, void* uct) noexcept
|
|||||||
report_fatal_error(msg);
|
report_fatal_error(msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void sigpipe_signaling_handler(int)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
const bool s_exception_handler_set = []() -> bool
|
const bool s_exception_handler_set = []() -> bool
|
||||||
{
|
{
|
||||||
struct ::sigaction sa;
|
struct ::sigaction sa;
|
||||||
@ -1802,6 +1806,13 @@ const bool s_exception_handler_set = []() -> bool
|
|||||||
std::abort();
|
std::abort();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sa.sa_handler = sigpipe_signaling_handler;
|
||||||
|
if (::sigaction(SIGPIPE, &sa, NULL) == -1)
|
||||||
|
{
|
||||||
|
std::fprintf(stderr, "sigaction(SIGPIPE) failed (%d).\n", errno);
|
||||||
|
std::abort();
|
||||||
|
}
|
||||||
|
|
||||||
std::printf("Debugger: %d\n", +IsDebuggerPresent());
|
std::printf("Debugger: %d\n", +IsDebuggerPresent());
|
||||||
return true;
|
return true;
|
||||||
}();
|
}();
|
||||||
|
Loading…
Reference in New Issue
Block a user