title: Process.fork in Rails controller
body: <p>We're doing some prototyping of a new app and noticed that one of the actions were taking forever to load (80-120 seconds). As a lot of the processing doesn't need to happen on page load (we can request the data via Ajax later), I thought of using <code>Process.fork</code> to allow the page to return immediately, while the processing still happening "behind the scenes."</p>
  
  <p>We're using Apache with Passenger for the app.</p>
  
  <p>A couple of things:</p>
  
  <ol>
  <li><p>I know about delayed_jobs, resque, BJ and other background job gems. We use dj, and eventually will use something like it for this as well. This is a stopgap solution while we're prototyping.</p></li>
  <li><p>I'm not concerned with server performance. The app runs on its own server, with only a handful of users trying it out.</p></li>
  </ol>
  
  <p>Early tests suggest this works well, but I'm wondering whether it would be a good idea to use this. Is it going to be reliable? Are the forked process going to continue if the user navigates to another page, or closes tab/browser? After the fork has finished, is the process going to terminate by itself?</p>