Example #1
0
 def watcher(path, restart):
     for filename in enum_changes(path):
         if not filename:
             log('wfastcgi.py exiting because the buffer was full')
             run_exit_tasks()
             ExitProcess(0)
         elif restart.match(filename):
             log('wfastcgi.py exiting because %s has changed, matching %s' % (filename, restart_regex))
             # we call ExitProcess directly to quickly shutdown the whole process
             # because sys.exit(0) won't have an effect on the main thread.
             run_exit_tasks()
             ExitProcess(0)
Example #2
0
 def _wait_for_exit():
     WaitForSingleObject(evt, INFINITE)
     run_exit_tasks()
     ExitProcess(0)