How to keep a process running after logout with bash without help from disown and nohup

Necessary and Sufficient Conditions based on my test: (AWS Ubuntu EC2)
1. redirect input and output
2. put it to background by & sign

By doing the two above, with neither disown nor nohup, my process keeps running even after logout from ssh.
However, I am not very clear why.
Example: for(( i = 0; i < 5; i++)); do sleep 2; echo $i; done t.txt 2>&1 &

Previous Post
Comments are closed.
%d bloggers like this: