From: "Bermejo, Rodrigo" Date: 2004-02-03T10:10:49+09:00 Subject: Re: shell scripts in background (with &) - why would they stop? nohup ./processFiles.rb& exit or ruby -e 'fork do exec("./processFiles.rb&") end' will make the trick .... ronnie. Ruby Baby wrote: >Shouldn't a Ruby script keep running if someone uses the "&" at the end of the command? > >I have a script that takes hours to run, processing many files, on a remote server. > >If I start it like this... >./processFiles.rb >... it will work, but I have to keep an SSH terminal window open for hours. > >If I start it like this... >./processFiles.rb & >... and then I close my SSH session to let it run >... it stops immediately after I log out. > > >Is that expected behavior? > >How would I get it to keep running (like my regular /bin/sh shell scripts) after I log out? > >I could give example code if someone wants to see it. > >