“如何流产”在不支持C中信号的平台上实施?

发布于 2025-01-24 08:44:54 字数 142 浏览 3 评论 0原文

C中的中止函数应该引起sigabrt信号。但是,如果基础平台不支持sigabrt信号,或者根本不支持信号,例如,当C移植到某些不符合Posix的OS时。在这种情况下,实施者应该做什么?

The abort function in C is supposed to raise a SIGABRT signal. But what if the underlying platform does not support the SIGABRT signal or does not support signals at all, for example, when C is ported to some non-Posix-compliant OSes. In this case, what should the implementer do?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

缱绻入梦 2025-01-31 08:44:54

实际上很简单。在这种情况下,C运行时的实现者需要确保在没有OS的帮助的情况下将sigabrt传递到signal。它纯粹是在一个过程中。

Fairly simple, in fact. In that case, the implementer of the C runtime needs to make sure that SIGABRT is delivered to signal, without help from the OS. It's purely inside a single process.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文