Process.exit

You're seeing just the function exit, go back to Process module for more information.

Specs

exit(pid(), term()) :: true

Sends an exit signal with the given reason to pid.

The following behaviour applies if reason is any term except :normal or :kill:

  1. If pid is not trapping exits, pid will exit with the given reason.

  2. If pid is trapping exits, the exit signal is transformed into a message {:EXIT, from, reason} and delivered to the message queue of pid.

If reason is the atom :normal, pid will not exit (unless pid is the calling process, in which case it will exit with the reason :normal). If it is trapping exits, the exit signal is transformed into a message {:EXIT, from, :normal} and delivered to its message queue.

If reason is the atom :kill, that is if Process.exit(pid, :kill) is called, an untrappable exit signal is sent to pid which will unconditionally exit with reason :killed.

Inlined by the compiler.

Examples

Process.exit(pid, :kill)
#=> true