Changeset 1816
- Timestamp:
- 11/02/07 17:27:23
- Files:
-
- trunk/cherrypy/restsrv/plugins.py (modified) (5 diffs)
- trunk/cherrypy/restsrv/wspbus.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/cherrypy/restsrv/plugins.py
r1759 r1816 165 165 self.bus.log('umask old: %03o, new: %03o' % 166 166 (old_umask, umask)) 167 start.priority = 7 0167 start.priority = 75 168 168 169 169 … … 187 187 188 188 def start(self): 189 # forking has issues with threads: 190 # http://www.opengroup.org/onlinepubs/000095399/functions/fork.html 191 # " ... The general problem with making fork() work in a multi-threaded world 192 # is what to do with all of the threads. ... " 193 # So we check for active threads: 194 if threading.activeCount() != 1: 195 self.bus.log('There are more than one active threads. Daemonizing now may cause strange failures.') 196 self.bus.log(str(threading.enumerate())) 197 189 198 # See http://www.erlenstar.demon.co.uk/unix/faq_2.html#SEC16 190 199 # (or http://www.faqs.org/faqs/unix-faq/programmer/faq/ section 1.7) … … 237 246 238 247 self.bus.log('Daemonized to PID: %s' % os.getpid()) 239 start.priority = 10248 start.priority = 65 240 249 241 250 … … 298 307 self.thread.start() 299 308 self.bus.log("Started thread %r." % threadname) 309 start.priority = 70 300 310 301 311 def stop(self): … … 330 340 self.mtimes = {} 331 341 Monitor.start(self) 342 start.priority = 70 332 343 333 344 def run(self): trunk/cherrypy/restsrv/wspbus.py
r1813 r1816 136 136 try: 137 137 output.append(listener(*args, **kwargs)) 138 except (KeyboardInterrupt, SystemExit):138 except KeyboardInterrupt: 139 139 raise 140 except SystemExit, e: 141 # If we have previous errors ensure the exit code is non-zero 142 if exc and e.code == 0: 143 e.code = 1 144 raise 140 145 except: 141 146 self.log("Error in %r listener %r" % (channel, listener),

