In short, by setting up a signal handler for SIGABRT. More specifically, if you specify a flag SA_SIGINFO
when setting a signal handler, the structure siginfo_t
must be populated with additional information about the signal, including the sender ID, etc.
source
to share