Logging out of an SSH session in an Erlang virtual machine without stopping the VM or leaving obsolete processes

I have an Erlang application running as a daemon configured as an SSH server. I can connect to it using the SSH client, and I get the standard Erlang REPL.

If I am 'q ().' I closed Erlang VM, not the connection. If I close the connection ("~." For OpenSSH, close the window in PuTTY), some processes will remain in the sshd_sup / ssh_system_xx_sup tree. They look like obsolete shell processes.

I do not see any exported function in the shell module that would allow me to close the shell (and therefore the SSH connection) without affecting the entire VM.

How can I exit an SSH session so as not to leave outdated processes in the VM?

+6
erlang
source share
1 answer

'exit (). in the client, SSH disconnects the connection without stopping the virtual machine.

I could not find this documentation anywhere, but it seems almost what I want.

Instead of leaving 4 outdated processes on the completed connection, for example, kill the client, "exit ()". leaves 2 incomplete processes.

Now it can be in the area of ​​the ssh module and is no longer in the area of ​​the shell module.

+4
source share

All Articles