提交 def276da 编写于 作者: J Josh Peterson

Don't call sa_sigaction when it is NULL

It is possible for the sa_sigaction callback to be NULL. This happens
for abort signal. Calling a NULL method will cause the signal handler to
hang, which will cause Unity to hang, instead of crashing. This can be
unhelpful when tests are running, for example.
上级 368320ae
......@@ -133,7 +133,8 @@ SIG_HANDLER_SIGNATURE (mono_chain_signal)
saved_handler->sa_handler (signal);
} else {
#ifdef MONO_ARCH_USE_SIGACTION
saved_handler->sa_sigaction (signal, info, ctx);
if (saved_handler->sa_sigaction != NULL)
saved_handler->sa_sigaction (signal, info, ctx);
#endif /* MONO_ARCH_USE_SIGACTION */
}
return TRUE;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册