Log out of an SSH session into Erlang VM without stopping the VM or leaving stale processes

Posted by Garret Smith on Stack Overflow See other posts from Stack Overflow or by Garret Smith
Published on 2010-03-29T16:40:18Z Indexed on 2010/03/29 16:43 UTC
Read the original article Hit count: 291

Filed under:

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

If I 'q().' I shut down the Erlang VM, not the connection. If I close the connection ('~.' for OpenSSH, close the window in PuTTY) some processes remain under the sshd_sup/ssh_system_xx_sup tree. These appear to be stale shell processes.

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

How should I be logging out of the SSH session to not leave stale processes in the VM?

© Stack Overflow or respective owner

Related posts about erlang