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 a typical application exit() seems to be more safe version of abort()…? Are there any other concerns to use abort() instead of exit()?
Share
Using
abortwill dump core, if the user has core dumps enabled. So as a rule of thumb, I’d useabortif you’re so unsure about what’s gone wrong that the only way to get useful information about it is by analysing a core dump.If you can safely
exitfrom any given point, and don’t need the core dump, then exit is a nicer approach.