开发者

Terminating because of 6 signal

I compil开发者_StackOverflowed and ran my code and got the following error:

Terminating because of 6 signal

What is signal 6 and what causes it?


It's probably talking about signal 6, which is SIGABRT, i.e. abort. The code itself most likely called abort(), or perhaps an assert failed.

You can list the signal numbers from the command line using

kill -l

HTH.


Signal 6 is usually SIGABRT.

One thing that causes that is the system call 'abort()'.

It appears your program also has a signal handler that catches SIGABRT and prints out the message, maybe like:

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

You can also use the system functions 'kill()' or 'raise()' with SIGABRT (or 6) as the signal argument. The signal could also be sent by another process.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜