change:添加win下SIGINT单独触发用户回调。
This commit is contained in:
parent
2cf72f3e5c
commit
9b2a5690df
@ -4528,6 +4528,7 @@ public:
|
||||
SetUnhandledExceptionFilter(crash_handler);
|
||||
|
||||
signal(SIGABRT, signal_handler);
|
||||
signal(SIGINT, msignal_handler);
|
||||
_set_abort_behavior(0, _WRITE_ABORT_MSG | _CALL_REPORTFAULT);
|
||||
|
||||
std::set_terminate(&terminator);
|
||||
@ -4629,6 +4630,13 @@ private:
|
||||
abort();
|
||||
}
|
||||
|
||||
static inline void msignal_handler(int sig)
|
||||
{
|
||||
if (user_sig_handler_) {
|
||||
user_sig_handler_(sig);
|
||||
}
|
||||
}
|
||||
|
||||
static inline void __cdecl invalid_parameter_handler(const wchar_t*, const wchar_t*, const wchar_t*, unsigned int,
|
||||
uintptr_t)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user