exitProcess
Terminates the currently running process.
inline fun exitProcess(status: Int): Nothing(source)
import kotlin.system.exitProcess
fun main() {
println("Starting the program.")
val shouldExit = true
if (shouldExit) {
println("Exiting now with status 0.")
exitProcess(0)
}
println("This line will not be reached.")
}