Logo

Programming-Idioms

This language bar is your friend. Select your favorite languages!
  • Js

Idiom #198 Abort program execution with error condition

Abort program execution with error condition x (where x is an integer value)

process.exit(x);
#include <stdlib.h>
exit(x);

Calls all functions registered with atexit, then flushes and closes all streams and finally terminates the process.

New implementation...
< >
Bart