How to Handle SIGABRT signal?

前端 未结 3 1090
一向
一向 2020-12-03 18:32

Here is the code on which I set my handler for SIGABRT signal then I call abort() but handler does not get trigered, instead program gets aborted,

3条回答
  •  無奈伤痛
    2020-12-03 19:18

    You get those symptoms i.e. the popup debug dialog, when you have a debug build (with windows and Visual Studio- I'm testing with 2012 version), since it sets a debug break, in the debug implementation of abort() ). If you pick "ignore" you get that message "Function triger"

    If you do a release build, then you don't get the debug popup dialog, and you get the message, as expected

提交回复
热议问题