Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to leave erlang shell without shutting down erlang VM

I searched for this and found that the command is Ctrl-D, but that is not working for me.

Rest all options are shutting the VM down.

I am using erlang 19.3 with erlang.mk

Ctrl-D is working supposedly for rest of the logins and shell. This is so strange. Any help is appreciated.

like image 570
t0il3ts0ap Avatar asked Nov 24 '25 20:11

t0il3ts0ap


2 Answers

You can quit with the command:

q().

This might not work because of the previous commands. If that is the case then forget the previous commands by first running the command below f() the q() above:

f().

This takes you out of the erlang shell.

After leaving the shell you can view running processes. View running processes in linux/mac by running the command below on your terminal, if you are using windows then use windows task manager to see if erlang is running:

ps -ax
like image 137
Bheki Dube Avatar answered Nov 28 '25 02:11

Bheki Dube


It seems Ctrl-D only works for attach console.

make run with erlang.mk opens up the main console, quitting which always shutdowns the erlang VM.

I went and ran ./XXX_release start as generated by erlang.mk build. This starts the VM without running the console.

Then ./XXX_release attach which attaches to the VM of the previous step. Ctrl-D works on this as expected.

like image 34
t0il3ts0ap Avatar answered Nov 28 '25 01:11

t0il3ts0ap



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!