I see nobody explained what happened. I try.
On UNIX/Linux processes are spawned in a tree.
At the root there is a process called "init" which is spawns every other process. init has the first PID (process ID) so 1 (or 0 on some systems).
So somewhere in the tree there is a process called sshd, which is the deamon (therefore the d in sshd) which provides the ssh server. When a user logs in via ssh sshd will spawn a process (ssh login shell) for the user. Now when the user starts a program like it will be spawned by the ssh login shell.
So minetest is a child of your ssh shell. When you exit the shell it will be exited (closed/terminated), therefore all childs (like the minecraft server) die.
Let's look at the simplified tree:
init
└─ sshd
└─ ssh session
└── login shell
└── minetest
So when you leave the session all three processes will die.
That's it.
There are several ways to "disconnect" a child process from its parent (it will get another parent - remember there is always init). Like
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
- Code: Select all
command &
command & disown
nohup command
When you use screen/tmux your process (minetest server) will be a child of screen/tmux, which is not a child of sshd or it's sessions for obvious reasons.
If you want to look at the tree, just use
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Hope this explanation helps.
lightonflux