When I connect to remote Linux server via ssh and run some command in bash shell with ampersand at the end, for some reason the process is still alive even if I exit shell or close the terminal. Bash version is 5.0.3(1).
The command example is simple as:
sleep 120 &
But it works the same way with any command I tried, for example making mysql database backup
Also tested it in zsh shell on my macbook, process gets killed when shell is exited.
So why such behaviour would be possible in bash in case I don't use nohup, screen or something that prevents killing the process?