Hermanverschooten
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
Trending in Questions
I’m working on a project that simulates the bumbl example in the programming phoenix book. It acts almost like an email client. We have a...
New
Hello,
I know there is an approach for handling lists that allows for optimized traversal, but I can’t recall the specific method (somet...
New
Documentation
While reading the Scoped Routes section, I noticed that the documentation currently refers to a problem without explainin...
New
I’m seeing that a list inside a Kino.DataTable will be interpreted as a charlist, even if the Kino.configure() is set to charlists: :as_l...
New
So my question is quite simple and i have found no conclusive answer on forum, google or AI.
Should we use :erlang.float for Integer to ...
New
Hi, I’ve just set up an application with ash_authentication. There is only magic link strategy for now, so there is no confirmation add o...
New
If a change or preparation module uses Ash.Changeset.get_argument/2 or Ash.Query.get_argument/2 (or any of the other get_argument functio...
New
Other Trending Topics
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
I am happy to introduce the very α version of the new programming language compiled to BEAM.
Welcome Cure.
It has literally three kille...
New
Hi there! We created Gust: A task orchestrator inspired by Airflow.
For those who have never heard about Aiflow, it’s a Python-based wor...
New
Hi everyone!
The first release candidate for the Expert language server project is now available!
We’ve published a press release detai...
New
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixirconf-us
- #ai
- #blog-post
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #metaprogramming
- #hex
- #security










Showing Posts 1 to 10- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
slouchpie
I often use control-\
Hermanverschooten
That combination seems to be bound to tmux, it jumps back to the last pane.
DidactMacros
Maybe the normal close (ctlr double c) uses
stopinstead, which is meant to be less aggressive thanSystem.halt.There may have been something preventing the sequential shutdown of the runtime?
Hermanverschooten
Definitely not
System.stop, when I do that I see a lot of errors/warnings I do not see with the ctrl-c norSystem.haltsodapopcan
WHOA! I had no idea that worked.
03juan
Here’s another tip courtesy of the
Systemmodule.You know “that” error…?
Just do as it says…
It’ll recompile and reload everything for you.
acangiano
The first
CTRL-Cgets you into the break menu which gives you a few diagnostic options. When you then pressqoraandENTER, or simply anotherCTRL-Cyou are effectively doing aSystem.halt(0)call.CTRL-\bypasses the break menu altogether and quits.System.stop(0)is more graceful thanSystem.halt(0).System.stop(0)signals:sigstopto the Erlang VM. It’s the same as calling:init.stop(0). From the documentation:System.halt(0)signals a:sigquitto the VM, which is equal to calling:erlang.halt(0). It abruptly shuts down everything (no apps are gracefully stopped or ports properly closed.)You’ll notice that
System.stop(0)takes a moment to shut down and returns an:okatom if successful.System.halt(0)is essentially immediate.arcanemachine
I always assumed that
System.haltwas more aggressive in that sense. I mean,System.stoptakes longer, so it must be exiting more gracefully!That being said, I always exit by double-pressing
Ctrl + C, and I’ve never had any issues with ports being left open, or any bad side effects like that.Would love to get this cleared up, though, simply for the sake of “best practices”.
acangiano
There are scenarios where
CTRL-Ctwice 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 wantCTRL-Gto bring up the User switch command menu, followed byq. Tryhto see the options available.slouchpie
I use zellij