spacepaste

  1.  
  2. + w = None
  3. + if waitForStart:
  4. + r, w = os.pipe()
  5. if os.fork(): # launch child and...
  6. - os._exit(0) # kill off parent
  7. + code = 0
  8. + if waitForStart:
  9. + code = self._waitForStart(r)
  10. + os.close(r)
  11. + os._exit(code) # kill off parent
  12. os.setsid()
  13. if os.fork(): # launch child and...
  14. os._exit(0) # kill off parent again.
  15. @@ -193,6 +213,7 @@
  16. if IReactorDaemonize.providedBy(reactor):
  17. reactor.afterDaemonize()
  18. + return w
  19.