2
votes

I want to detach shell from erlang process without closing process. Does exist function like halt() or q() but for detaching shell? I tried to use Ctrl+D but it doesn't work, i use ssh maybe problem in that

--------Update --------------

I run my rebar3 release with command "bin/timeio start", sometimes i need to execute commands in that process from shell then I connecting to that process with rebar3 release command "bin/timeio attach" (it is simple erlang shell, I assume) but i can't detach from process

1
What process do you want to detach from? Provide an example what do you want to achieve. - Hynek -Pichi- Vychodil
Are you just trying to detach from the Erlang shell, while still having your program run? - Justin Wood
I updated my question - Azat
When you say it doesn't work, what do you mean? how does the shell react? - Ahmed Omar
Have you tried ctrl-g followed by q? - Steve Vinoski

1 Answers

3
votes

CTRL-D should get you out and keep the app running. when you "attach" you are doing the same thing as running to_erl. To exit in from this you type control-D.,

 bin ⚑ ◒  → ./otto attach                                                                                                                                           master ✗ 83d
Attaching to /tmp/erl_pipes/[email protected]/erlang.pipe.1 (^D to exit)

([email protected])1> [Quit]
 bin ⚑ ◒  → ./otto attach                                                                                                                                           master ✗ 83d
Attaching to /tmp/erl_pipes/[email protected]/erlang.pipe.1 (^D to exit)

([email protected])1> [Quit]
 bin ⚑ ◒  → ./otto attach                                                                                                                                           master ✗ 83d
Attaching to /tmp/erl_pipes/[email protected]/erlang.pipe.1 (^D to exit)

([email protected])1> [Quit]
 bin ⚑ ◒  →                                                                                                                                                         master ✗ 83d