title: Alternative for spawning a process with 'fork' in jRuby?
body: <p>In MRI Ruby I can do this:</p>
  
  <pre><code>def transfer
    internal_server = self.init_server
    pid = fork do
      internal_server.run
    end
  
    # Make the server process run independently.
    Process.detach(pid)
  
    internal_client = self.init_client
    # Do other stuff with connecting to internal_server...
    internal_client.post('some data')    
  ensure
    # Kill server
    Process.kill('KILL', pid) if pid
  end
  </code></pre>
  
  <p>However the above code will not run in jRuby, because it does not support 'fork' method:</p>
  
  <pre><code>NotImplementedError: fork is not available on this platform
  </code></pre>
  
  <p>Is there any alternative solution for this in jRuby?</p>
  
  <p>Thanks.</p>