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
Use abort()
if your program is in a possibly corrupt state and you consider it too dangerous to try to do anything further. exit()
will cause any atexit
functions, and in C++ destructors of static objects, to be called. This is usually what you want for a clean exit, but it could be catastrophic if, for example, they overwrite a file with corrupt data.