From: Andrew Kaspick Date: 2009-07-10T14:34:30+09:00 Subject: Re: how can I start a shell process and return immediately? Enling Li wrote: > I have another quetion related to fire off a back ground shell process > on a remote Linux. > > require "net/ssh" > > ssh = Net::SSH.start( '10.0.77.87', 'toor', :password=>'logapp') > ssh.exec!("/root/test.pl &") > ssh.close > puts "I want to be here immediately, but not" > > The above code hangs also because test.pl contains a long sleep and do > nothing. Can someone offer me a help? > > Thank you in advance. > > Enling I run long running remote tasks that return immediately with... ssh.exec!("nohup /root/test.pl >/tmp/test.log 2>&1 &") -- Posted via http://www.ruby-forum.com/.