Indeed, I solved the problem (for scripts) by launching commands this way:
$ nohup my-command </dev/null &
After finding a workaround I indeed found that this is a well known "problem" but it's not a bug, insted. As far as I could check, ssh is respecting the POSIX standard when not closing the session if a process is still attached to the tty. Other programs which did not show this behavior, such as some telnet, are behaving in a non-compliant way.
Anyway, the previous workaround is fine for me.
A small tip: Should your (Open)SSH session "hang" in such a situation, you can just use the ~. sequence to disconnect it. Don't worry, your nohup-ed process will keep running anyway.
2 comments:
If that doesn't work for you try redirecting stdin, stdout and stderr:
nohup /dev/null 2>&1 &
thanks a lot. it helped a lot.
Post a Comment