HiveBrain v1.2.0
Get Started
← Back to all entries
patterncppCritical

When does a process get SIGABRT (signal 6)?

Submitted by: @import:stackoverflow-api··
0
Viewed 0 times
processsigabrtdoeswhengetsignal

Problem

What are the scenarios where a process gets a SIGABRT in C++? Does this signal always come from within the process or can this signal be sent from one process to another?

Is there a way to identify which process is sending this signal?

Solution

abort() sends the calling process the SIGABRT signal, this is how abort() basically works.

abort() is usually called by library functions which detect an internal error or some seriously broken constraint. For example malloc() will call abort() if its internal structures are damaged by a heap overflow.

Context

Stack Overflow Q#3413166, score: 291

Revisions (0)

No revisions yet.