From: Enling Li Date: 2009-07-11T01:45:53+09:00 Subject: Re: how can I start a shell process and return immediately? Andrew, That is excellent. It resolved the issue. Thank you very much. Enling Andrew Kaspick wrote: > 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/.