'How is "abort" implemented on platforms that does not support signals in C?
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?
Solution 1:[1]
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.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | MSalters |
