&& operator prevents backgrounding over ssh

2013-09-26 Thread Hinrik Örn Sigurðsson
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. Furth

Re: && operator prevents backgrounding over ssh

2013-09-26 Thread Greg Wooledge
On Thu, Sep 26, 2013 at 06:27:10AM +, Hinrik Örn Sigurðsson wrote: > 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)

Re: && operator prevents backgrounding over ssh

2013-09-26 Thread Geir Hauge
2013/9/26 Hinrik Örn Sigurðsson > 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

Re: && operator prevents backgrounding over ssh

2013-09-26 Thread Chet Ramey
On 9/26/13 10:52 AM, Greg Wooledge wrote: > On Thu, Sep 26, 2013 at 06:27:10AM +, Hinrik Örn Sigurðsson wrote: >> 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 &"

Re: && operator prevents backgrounding over ssh

2013-09-26 Thread Bob Proulx
Hinrik Örn Sigurðsson wrote: > 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 &" Just a reminder that ssh reads from stdin unless explicitly told to avoid reading from

Re: && operator prevents backgrounding over ssh

2013-09-26 Thread Chet Ramey
On 9/26/13 11:44 AM, Geir Hauge wrote: > 2013/9/26 Hinrik Örn Sigurðsson > >> 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

Re: && operator prevents backgrounding over ssh

2013-09-26 Thread Hinrik Örn Sigurðsson
On Thu, Sep 26, 2013 at 8:07 PM, Bob Proulx wrote: > Just a reminder that ssh reads from stdin unless explicitly told to > avoid reading from stdin. If stdin isn't going to be used then the -n > option should be used. > [...] > Regardless of the resolution of the above question about bash the > u

Re: && operator prevents backgrounding over ssh

2013-09-26 Thread Bob Proulx
Hinrik Örn Sigurðsson wrote: > Bob Proulx wrote: > > Just a reminder that ssh reads from stdin unless explicitly told to > > avoid reading from stdin. If stdin isn't going to be used then the -n > > option should be used. > > [...] > > Regardless of the resolution of the above question about bash

Re: && operator prevents backgrounding over ssh

2013-09-26 Thread bill duncan
It closes stdin, not stdout or stderr.. On Thu, Sep 26, 2013 at 9:14 PM, Hinrik Örn Sigurðsson wrote: > On Thu, Sep 26, 2013 at 8:07 PM, Bob Proulx wrote: > > Just a reminder that ssh reads from stdin unless explicitly told to > > avoid reading from stdin. If stdin isn't going to be used the