Process.exit(self, :normal)
does the job, but it prints out ** (EXIT from #PID<0.49.0>) normal
. Is there a way to exit without the message?
It depends on which application you are running. If you are building a script, you can invoke System.halt(0)
. If you have an application, do not call System.halt(0)
, as it will shutdown the whole system without considering all other applications. Instead use System.stop(0)
.
Alternatively, you can call exit(:shutdown)
to exit the current process. :shutdown
is a common reason for exit in OTP and if you are inside .exs
files, it will work just fine too.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With