title: gevent - hub.loop.reinit() does not work after fork
body: <p>The <code>do_magic</code> function would be called twice in the following example, both in parent and child process.</p>
  
  <p>My confusion is the <code>os.fork</code> has been replaced with <code>gevent.fork</code>, and <code>hub.loop.reinit()</code> would be called in child process. If so, why <code>do_magic</code> still be called in child process?</p>
  
  <pre class="lang-py prettyprint-override"><code>import gevent
  
  from gevent import monkey
  monkey.patch_all()
  
  import os, time
  
  
  def do_magic():
      print 'magic...'
  
  
  def main():
      g = gevent.spawn_later(1, do_magic)
  
      pid = os.fork()
      if pid != 0:  # parent
          g.join()
      else:
          gevent.get_hub().loop.reinit()
          time.sleep(3)
  
  
  main()
  </code></pre>