We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
我看Tencent Bugly里面会对其他信号处理进行兼容:
static void my_handler(const int code, siginfo_t *const si, void *const sc) { ... /* Call previous handler. */ old_handler.sa_sigaction(code, si, sc); }
参考他们的文章:https://zhuanlan.zhihu.com/p/27834417
某些信号可能在之前已经被安装过信号处理函数,而sigaction一个信号量只能注册一个处理函数,这意味着我们的处理函数会覆盖其他人的处理信号 保存旧的处理函数,在处理完我们的信号处理函数后,在重新运行老的处理函数就能完成兼容。
所以在xcd_core_signal_handler里是否需要回调旧的信号处理函数呢?
The text was updated successfully, but these errors were encountered:
xCrash 默认会恢复上一个注册的 signal handler,处理方式和 bugly 是一样的,恢复的逻辑在这里: https://github.com/iqiyi/xCrash/blob/master/src/native/libxcrash/jni/xc_crash.c#L407
如果不希望恢复之前的 signal handler,可以在初始化的时候设置 setNativeRethrow(false)。
setNativeRethrow(false)
Sorry, something went wrong.
好的,谢谢
No branches or pull requests
我看Tencent Bugly里面会对其他信号处理进行兼容:
参考他们的文章:https://zhuanlan.zhihu.com/p/27834417
所以在xcd_core_signal_handler里是否需要回调旧的信号处理函数呢?
The text was updated successfully, but these errors were encountered: