How is "abort" implemented on platforms that does not support signals in C?

65 Views Asked by At

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?

1

There are 1 best solutions below

2
MSalters On

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.