Exit codes

To indicate if a program ran successfully or had problem, exit codes are used.

Exit codes are the numeric values which tells the operating system that the executable ran successfully or not.

SRON's interpreter returns these exit codes:

  • 0: code ran successfully with no errors and exceptions.

  • 1: code ran into errors caused by logical issues.

  • 2: code tries to access a memory which it doesn't own.

  • 3: Your system has no memory left.

  • 4: code raises an exception thrown by std::exception of C++.

  • 5: Your source code is calling throwException() function.

  • 6: code exited due to stack overflow(mostly due to deep recursions).

  • 7: code terminated due to SIGINT signal (Ctrl+C).

  • 8: code terminated due to SIGKILL signal (kill <pid>).

  • 9: code terminated due to SIGBREAK signal(Ctrl+Enter).

  • 10: code terminated due to SIGTERM signal(Shutdown).

  • 11: code terminated due to SIGABRT signal(Abort).

  • 12: code terminated due to SIGSEGV signal(Segmentation Fault).

  • 13: code terminated due to unknown signal(or the signal not handled by SRON's interpreter).

Last updated