Funktionierender Prototyp des Serious Games zur Vermittlung von Wissen zu Software-Engineering-Arbeitsmodellen.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

twistd.py 871B

1 year ago
1234567891011121314151617181920212223242526272829303132333435363738
  1. # -*- test-case-name: twisted.test.test_twistd -*-
  2. # Copyright (c) Twisted Matrix Laboratories.
  3. # See LICENSE for details.
  4. """
  5. The Twisted Daemon: platform-independent interface.
  6. @author: Christopher Armstrong
  7. """
  8. from twisted.application import app
  9. from twisted.python.runtime import platformType
  10. if platformType == "win32":
  11. from twisted.scripts._twistw import (
  12. ServerOptions,
  13. WindowsApplicationRunner as _SomeApplicationRunner,
  14. )
  15. else:
  16. from twisted.scripts._twistd_unix import ( # type: ignore[misc]
  17. ServerOptions,
  18. UnixApplicationRunner as _SomeApplicationRunner,
  19. )
  20. def runApp(config):
  21. runner = _SomeApplicationRunner(config)
  22. runner.run()
  23. if runner._exitSignal is not None:
  24. app._exitWithSignal(runner._exitSignal)
  25. def run():
  26. app.run(runApp, ServerOptions)
  27. __all__ = ["run", "runApp"]