Why signal handler goes to infinite loop? - SIGSEGV

前端 未结 2 1300
盖世英雄少女心
盖世英雄少女心 2020-12-18 01:08

Any idea why the signal handler goes to infinite loop?

Here is the code. Please help me.

enter code here
 9 void SIGSEGV_handler(int signal)
10 {
11          


        
2条回答
  •  旧时难觅i
    2020-12-18 01:41

    http://pubs.opengroup.org/onlinepubs/009604599/functions/xsh_chap02_04.html#tag_02_04

    The behavior of a process is undefined after it returns normally from a signal-catching function for a SIGBUS, SIGFPE, SIGILL, or SIGSEGV signal that was not generated by kill(), sigqueue(), or raise().

提交回复
热议问题