exit#

Synopsis#

exit;          # exits with status 0
exit 0;        # success
exit 1;        # failure
exit $code;

Description#

Terminates the program with the given exit status.

Evaluates the argument as an integer exit status and terminates the process. If no argument is given, exits with status 0. END blocks and object destructors are run before exit (in perl5; pperl currently calls std::process::exit directly).

In daemon mode (config.daemon_mode), exit does not terminate the process but instead returns an Err(RuntimeError::Exit) so the caller can handle it.

See also#

die, END blocks