Hermanverschooten
Quitting an iex session - any difference between System.halt/1 & CTRL-C?
Generally when I want to quit an iex session I use the double control-c dance.
For unknown reasons this refused to work earlier today but I am not getting into that.
Because of it though I tried System.halt/1 to exit the session and that worked.
Is there a difference between the 2 methods?
Else I could add something like this to my .iex.exs
defmodule IexExtra do
def exit, do: System.halt()
end
import IexExtra
Then I can end my sessions with a plain and simple exit
Most Liked
DidactMacros
acangiano
There are scenarios where CTRL-C twice could take down daemons running on a remote node. Not much harm if you are just messing around locally. However, if we are talking best practices, you’d probably want CTRL-G to bring up the User switch command menu, followed by q. Try h to see the options available.
gregvaughn
I learned ctrl-g q from an Erlanger early in my Elixir career and taught it to my fingers.
Last Post!
Hermanverschooten
Popular in Questions
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #elixirconf-us
- #advent-of-code
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #hex









