Signal Termination 6

I compiled and ran my code and got the following error:

Terminating because of 6 signal

What is signal 6 and what causes it?

+3
source share
2 answers

This is probably about signal 6, which is SIGABRT, that is, it is interrupted. The code itself is most likely called abort(), or perhaps the statement failed.

You can list the signal numbers from the command line using

kill -l

NTN.

+6
source

Signal 6 is usually SIGABRT.

One thing that calls this is the abort () system call.

It looks like your program also has a signal handler that captures SIGABRT and displays a message, perhaps for example:

void handler(int signum)
{
    fprintf(stderr, "Terminating because of %d signal\n", signum);
    exit(1);
}

"kill()" "raise()" SIGABRT ( 6) . .

+5

Source: https://habr.com/ru/post/1734386/


All Articles