When abort() is preferred over exit()?

前端 未结 4 1215
傲寒
傲寒 2021-02-02 10:42

I know the differences between the two. One notable thing is that abort() sends SIGABRT signal, so it may be relevant when your software relies on them. But for

4条回答
  •  借酒劲吻你
    2021-02-02 11:09

    Abort is preffered when application doesnot able to handle the exception and not able to understand what to do scenario. Exit() mean application should must finish all task gracefully. if exception occurs and application is able to handle the same then Exit() call happens.

提交回复
热议问题