Search code examples
c++linuxwinapisentrymultiplatform

__fastfail alternative for Linux?


Our codebase uses Sentry to handle crashes, but due to some edge cases, we had to use __fastfail(FAST_FAIL_FATAL_APP_EXIT).

Of course, this is a windows specific function, so I was wondering if there was a Linux alternative to it. Or rather, if what this function does is already what the default exit() function does for Linux.

The idea of __fastfail is to terminate the calling process with minimum overhead.

We made linux release use exit(), though due to the limited amount of Linux testers we have, and the edge cases being rare, unsure if it had the desired effect.


Solution

  • _exit(2) terminates the calling process "immediately".

    By the way exit(3) has a reference to _exit(2).