Logo

Programming-Idioms

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

Idiom #186 Exit program cleanly

Exit a program cleanly indicating no error to OS

exit(0);
#include <stdlib.h>
exit(EXIT_SUCCESS);
Environment.Exit(0);
import 'dart:io';
exit(0);
erlang:exit(0).
  STOP
import "os"
os.Exit(0)
import "os"
defer os.Exit(0)
import System.Exit
exitSuccess
process.exit()
System.exit(0);
import kotlin.system.exitProcess
exitProcess(0)
require 'os'
os.exit(0)
Halt;
Application.Terminate;
exit;
import sys
sys.exit(0)
exit
use std::process::exit;
exit(0);
sys.exit(0)

New implementation...