In Independent routines§

See primary documentation in context for sub exit

multi exit()
multi exit(Int(Any$status)

Exits the current process with return code $status or zero if no value has been specified. The exit value ($status), when different from zero, has to be opportunely evaluated from the process that catches it (e.g., a shell); it is the only way to return an exit code different from zero from a Main.

exit prevents the LEAVE phaser to be executed, but it will run the code in the &*EXIT variable.

exit should be used as last resort only to signal the parent process about an exit code different from zero, and not to terminate exceptionally a method or a sub: use exceptions instead.

The first call of exit in a process sets the return code, regardless of any subsequent calls to exit in the same, or any other thread.