The "&&" operator in bash seems to inhibit backgrounding when run over
ssh. You can try it with the following:

  ssh localhost "cd /tmp && nohup sleep 10 >/dev/null 2>&1 &"

The above command will wait for sleep(1) to finish before returning.
If it is run without ssh, it returns immediately. Furthermore, other
shells such as dash and zsh will return immediately regardless of
whether ssh is used.

A workaround in this case is to use "|| exit 1;" instead of "&&".

Reply via email to